Launching an EC2 Instance of the C-Phrase AMI

After you subscribe to the C-Phrase AMI, you launch it as an EC2 instance. The initial part of this video shows a launch of such an EC2 instance. As shown in the video, it is recommended that during EC2 launch step 3 (configure instance details) you provide the following advanced detail user-data as text:

#!/bin/bash
/root/start-cp.sh
This will run c-phrase-admin at launch and you will not need to SSH into the EC2 instance to start it manually. Just be sure that your security set-up has ingress on port 9999 as well as a range of ports that you will run NLIs on (for example ports 8000-9998).

Assuming that c-phrase-admin is running, to log in, just point your browser at port 9999 of the DNS of the EC2 instance(e.g. http://ec2-18-204-201-251.compute-1.amazonaws.com:9999). Note, as a default, you must access this using http not https. Once you get through, you will be presented with a username password entry screen. The initial user login is with username "admin" and the password that is the id of your EC2 instance. This will bring you to the main page of c-phrase-admin.

Changing the administrator user name and password

If you wish to change the username/password for c-phrase-admin, navigate to the Edit page and then click on the flask.config.json at the top left and edit the username and password values. In the screen below, we have changed the username to "michael" and the password to "i-0ae34gr54cfdgb53". Save this file, click the "Restart c-phrase-admin" button. On the next login will need to supply the new username and password.

Security policies

The recommended security policy for the C-Phrase EC2 instance has TCP ingress for port 9999 as well as a set of ports (e.g. in the range 8000-9999) that NL Iinterfaces might run on. The standard EC2 will also have SSH access open on port 22. Finally, if you will be running NLIs that access remote databases, then your C-Phrase EC2 will require access to such remote databases.

Migrating to newer versions of the AMI

Periodically there will be new releases of the C-Phrase AMI that include new features and bug fixes. To migrate, first download all of your configurations as .zip files from your old C-Phrase EC2 instance. Then extract these .zip files onto your local file system. Now go to the Create tab of the new c-phrase-admin and drag your extracted directories in the "Upload configuration" area at the bottom of the screen. This is how you will be able to migrate your configurations to new improved versions of C-Phrase.

Manually lanching c-phrase-admin via SSH

It is possible and maybe even desirable that you SSH into your EC2 Instance and launch or re-launch c-phrase-admin. In such a case you must use the LINUX screen command if you want the system to persist after you log out of SSH. Otherwise, after log out, c-phrase-admin will not work (report Errno 5). The following commands launch/relaunch c-phrase-admin:

screen -S admin
sudo /root/bin/c-phrase-kill-all # clear away any running interfaces.
sudo /root/start-cp.sh
CTRL-a-d (detach)