- Instances commands
- launch
- list
- ip
- start
- stop
- suspend
- resume
- delete
- Proxy Commands
- online
- offline
- proxy
- Miscellaneous Commands
- pull
- ssh
- scp
- visit
- forget
To be able to make use of Jetstream you will need to:
- Create an account on http://portal.xsede.org
- Send your XSEDE username to a LAPPS Grid admin so you can be added to our allocation.
- After you have been added to the LAPPS Grid allocation verify that you can log in to:
Once you are able to log in to the Jetstream system you will need to generate the openrc.sh file that is used by the Open Stack API to communicate with Jetstream.
To use command line commands to manage jetstream instances, one needs to have openstack client installed. That is, you need to have
- Python
pippython-openstackclientpackage installed withpip
For full instructions, see OpenStack Documentation on installation.
- Sign on to the Jetstream Dashboard
- Go to Compute -> Access & Security
- Select the API Access tab
- Click on the Download OpenStack RC File v3 button
- Rename the downloaded file to openrc.sh and move it someplace convenient.
NOTES
- The first (non-comment) line of the openrc.sh file sets the
OS_AUTH_URLvariable to an incorrect URL. You will be provided with the correct URL in a separate email. Please do not make this URL public (i.e. save it anywhere other than your openrc.sh file).
- Testing has revealed that the default value for
OS_AUTH_URLalso seems to work.
- Users will need two .pem files. The first is the lappsgrid-shared-key.pem that is used to
sshinto running Jetstream instances. Speak to one of the other team members to obtain the shared private key. The second is a key-pair generated via the OpenStack interface and is used to communicate with the OpenStack API. That is, the second key will be used as the value ofOS_KEYin youropenrc.shfile.
The remainder of this document assumes you will be using the jetstream script to manage Jetstream instances. The jetstream script is a bash script that streamlines calls to the OpenStack client for the Lappgrid use cases. The same functions can be performed via the OpenStack GUI or CLI.
jetstream launch [size] [ip] [image] nameLaunches in new instance on the Jetstream cluster. The size option determines the number of CPUs the instance will have (default is medium), the ip option determines the public IP address (if any) assigned to the instance (default is none), and the image option specifies the OS image the instance is to be launched from.
All instance names will have the string lappsgrid- prepended if they do not already have a lappsgrid- prefix.
Size Options
| Option | Size | CPU | Ram | Disk |
|---|---|---|---|---|
| -t, --tiny | tiny | 1 | 2GB | |
| -s, --small | small | 2 | 4GB | 20GB |
| -m, --medium | medium | 6 | 16GB | 60GB |
| -l, --large | large | 10 | 30GB | 120GB |
| -x, --xlarge | x-large | 24 | 60GB | 480GB |
Available Images
ubuntu(default) - Default Ubuntu 14.04.3 Development image.docker- Ubuntu image with Docker and Docker Compose.master- Ubuntu image with Docker, Compose, and Lappsgrid tools.centos- Default CentOS 7.2 image.
IP Allocation
- --ip free
assign an IP address from the pool of IP addresses that have been allocated but that are not currently associated with an instance. - --ip alloc
a new IP address is allocated from the global Jetstream address pool. The Lappsgrid allocation includes a maximum of 50 IP addresses at any one time. - --ip <address>
Assign the IP address to the new instance. The IP address must be an address that was previously allocation from the Jetstream address pool.
NOTE When an IP address is allocated for an instance that IP address is not released again when the instance is deleted. This means the Lappsgrid project can accumulate unused IP addresses if they are not recycled. Therefore it is always recommended to use the --ip free option if a public IP address is required. Use the jetstream ip free command to obtain a list of the currently available IP addresses.
Examples
jetstream launch test1
jetstream launch --large --image centos --ip 149.165.171.220 test2
jetstream launch -t --ip free test3- test1 will be a 6 CPU Ubuntu instance with no public IP address assigned.
- test2 will be a 10 CPU CentOS instance with the public IP 149.165.171.220
- test3 will be a 1 CPU Ubuntu instance with a public IP address drawn from the pool of available IP addresses. If no IP address is available in the pool the command will fail.
To ssh to an instance that does not have a public IP address first ssh in to the proxy server (149.165.168.244) and then ssh to the instance using its private IP (10.0.0.0/24) address
jetstream listDisplays a list of all instances currently running of the Jetstream cloud. There should always be at least one instance running; the proxy server on IP 149.165.168.244
jetstream ip list
lists all public IP addresses that have been allocated.jetstream ip free
lists the public IP addresses that have been allocated but are not currently associated with an instance.jetstream ip assign free <instance name>
associates an IP address from the pool of available to the named instance.jetstream ip assign 143.165.171.22 <instance name>
associates a specific IP address with the named instance. The IP address must have been previously allocated from Jetstream.
jetstream start <instance name>Starts an instance that was stopped with the jetstream stop command. The start command is equivalent to a power on of the server.
jetstream stop <instance name>Stops a running instance. The stop command is equivalent to a server shutdown (power off). Running applications will be given a chance to shutdown cleanly before being terminated.
jetstream suspend <instance name>Suspends a running instance. This is equivalent to putting the server to sleep. The state of the server is preserved and should be restored when the server is resumed.
jetstream resume <instance name>Resumes a suspended instance.
jetstream delete <instance name>Deletes a Jetstream instance. Be sure to save any data from the server before deleting it as all information on the server will be destroyed and unrecoverable.
The proxy server is a tiny instance running Nginx on a fixed IP address (149.165.168.244). The proxy server acts as the target for jetstream.lappsgrid.org and forwards requests to the appropriate Jetstream instance.
The proxy server also serves static content for http://downloads.lappsgrid.org
jetstream proxy 10.0.0.170Specify the IP address that jetstream.lappsgrid.org traffic should be forwarded to when the proxy is enabled. The IP address can either be a public or private IP address.
NOTE: This command runs the /usr/local/bin/proxy script on the proxy server which, in turn, rewrites the /etc/nginx/upstream.conf file.
Enables the jetstream Nginx site, that is, creates a symbolic link in /etc/nginx/sites-enabled.
jetstream onlineDisables the proxy, that is removes the symbolic link in /etc/nginx/sites-enabled/. When the proxy is disabled http://jetstream.lappsgrid.org will redirect to a static out of service page.
jetstream offlineEstablishes a ssh connect to the named instance. The instance must be running and have a public IP address. If the instance does not have a public IP address first ssh in to the proxy server and then ssh to the instance using its private IP address.
jetstream ssh proxyUses scp to copy a local file to the remote path on the proxy server.
jetstream scp /local/file /remote/pathOpens a web browser to the named instance. The instance must have a public IP address associated. An optional port and path can be specified after the instance name.
jetstream visit test
jetstream visit demo 8080/service_managerUsed to do a git pull in either the /var/lib/downloads/scripts or /var/lib/downloads/service-manager directories.
jetstream pull scripts
jetstream pull managerThis command is not really needed anymore since GitHub now posts to a web-hook at http://api.lappsgrid.org that updates the downloads site whenever code is pushed to the master branches.
Uses ssh-keygen program to remove the key associated with the server from ~/.ssh/known_hosts. Use the forget command when an IP address is being recycled and assigned to a different instance.
jetstream forget instance-name