TryStack on ARM – Getting Started and FAQs

Here are some commonly asked questions – more info will be added as we hear from the TryStack community. Please remember to apply for access by first joining the TryStack facebook group, and once accepted, submit the “Request for Access” online form to get credentials for the ARM zone.

1) How do I login (via SSH) to my instance?

Once your instance is spawned and ready for use, you can SSH into the public IP address assigned just like you would any other server. Make sure, however, that you assigned a “keypair” to your instance and connect via SSH root with your SSH key. (See “What is a OpenStack Keypair” below for more info.)

2) What is a (OpenStack) Keypair?

Keypairs are public/private SSH keys used for logging into your server instance.  You can create a keypair through the OpenStack dashboard, or import a key created locally on your machine (via ssh-keygen). To find out more about creating keypairs via the dashboard, visit: http://docs.openstack.org/trunk/openstack-compute/admin/content/about-the-dashboard.html Make sure you create/import a keypair prior to provisioning a new instance (and select the keypair for that intance).

3) What services does the TryStack ARM zone support?

We currently support the Nova-compute APIs and services. While we can support Nova-volume and other EC2 services, they are currently not enabled at this time. Instead, for simplicity sake, each instance created gets access to 150GB of local direct attached storage.

4) What is a floating IP address? Do I need to assign one to my instance?

Typically, in cloud infrastructures, each instance is automatically assigned a private IP address. A public floating IP address must then be assigned to the instance to make it accessible from the Internet. In order to simplify the provisioning process, we have disabled floating IPs from the TryStack ARM zone. Instead, each instance is automatically assigned a public IP address for the duration of that instance.

5) How come I can’t issue a reboot command from within my Linux instance?

We are currently using Linux Containers (LXC) as a means to integrate with OpenStack. Issuing a reboot or shutdown command will cause LXC to terminate the container/process, effectively killing the instance. At that point you will have to create a new instance. We are, however, working with multiple projects to provide a solution in the near-term.

6) How do I install Oracle Java?

The following steps will install the Oracle JDK using the Debian alternatives system, allowing it to be used side-by-side with other JVMs like OpenJDK if desired. They must be performed by root or a user with full sudo access.

1. Go to the Oracle JDK download page, accept the license agreement, and download the Linux ARM tarball (jdk-7u6-linux-arm-sfp.tar.gz).

2. Install the Ubuntu base Java package, which contains the update-java-alternatives program, and the soft-float ABI support libraries:

sudo apt-get install -y java-common libc6-armel libsfgcc1 libsfstdc++6

(Note: libsfstdc++6 is only required for third-party JNI native libraries that are dynamically linked against the C++ standard library.)

3. If no JVM has been installed yet, it is necessary to create the standard JVM root directory:

sudo mkdir -p /usr/lib/jvm

4. Extract the tarball downloaded in step 1 into this directory:

cd /usr/lib/jvm
sudo tar xzf /path/to/jdk-7u6-linux-arm-sfp.tar.gz

5. Create a symbolic link to the extracted JDK using the standard naming convention:

sudo ln -s jdk1.7.0_06 java-7-oracle

6. Install alternatives for the various JDK tools by executing the following commands:

sudo update-alternatives --quiet --install /usr/bin/java java /usr/lib/jvm/java-7-oracle/jre/bin/java 100
sudo update-alternatives --quiet --install /usr/bin/keytool keytool /usr/lib/jvm/java-7-oracle/jre/bin/keytool 100
sudo update-alternatives --quiet --install /usr/bin/pack200 pack200 /usr/lib/jvm/java-7-oracle/jre/bin/pack200 100
sudo update-alternatives --quiet --install /usr/bin/policytool policytool /usr/lib/jvm/java-7-oracle/jre/bin/policytool 100
sudo update-alternatives --quiet --install /usr/bin/rmid rmid /usr/lib/jvm/java-7-oracle/jre/bin/rmid 100
sudo update-alternatives --quiet --install /usr/bin/rmiregistry rmiregistry /usr/lib/jvm/java-7-oracle/jre/bin/rmiregistry 100
sudo update-alternatives --quiet --install /usr/bin/unpack200 unpack200 /usr/lib/jvm/java-7-oracle/jre/bin/unpack200 100
sudo update-alternatives --quiet --install /usr/bin/orbd orbd /usr/lib/jvm/java-7-oracle/jre/bin/orbd 100
sudo update-alternatives --quiet --install /usr/bin/servertool servertool /usr/lib/jvm/java-7-oracle/jre/bin/servertool 100
sudo update-alternatives --quiet --install /usr/bin/tnameserv tnameserv /usr/lib/jvm/java-7-oracle/jre/bin/tnameserv 100
sudo update-alternatives --quiet --install /usr/bin/jexec jexec /usr/lib/jvm/java-7-oracle/jre/lib/jexec 100
sudo update-alternatives --quiet --install /usr/bin/appletviewer appletviewer /usr/lib/jvm/java-7-oracle/bin/appletviewer 100 --slave /usr/share/man/man1/appletviewer.1 appletviewer.1 /usr/lib/jvm/java-7-oracle/man/man1/appletviewer.1
sudo update-alternatives --quiet --install /usr/bin/apt apt /usr/lib/jvm/java-7-oracle/bin/apt 100 --slave /usr/share/man/man1/apt.1 apt.1 /usr/lib/jvm/java-7-oracle/man/man1/apt.1
sudo update-alternatives --quiet --install /usr/bin/extcheck extcheck /usr/lib/jvm/java-7-oracle/bin/extcheck 100 --slave /usr/share/man/man1/extcheck.1 extcheck.1 /usr/lib/jvm/java-7-oracle/man/man1/extcheck.1
sudo update-alternatives --quiet --install /usr/bin/idlj idlj /usr/lib/jvm/java-7-oracle/bin/idlj 100 --slave /usr/share/man/man1/idlj.1 idlj.1 /usr/lib/jvm/java-7-oracle/man/man1/idlj.1
sudo update-alternatives --quiet --install /usr/bin/jar jar /usr/lib/jvm/java-7-oracle/bin/jar 100 --slave /usr/share/man/man1/jar.1 jar.1 /usr/lib/jvm/java-7-oracle/man/man1/jar.1
sudo update-alternatives --quiet --install /usr/bin/jarsigner jarsigner /usr/lib/jvm/java-7-oracle/bin/jarsigner 100 --slave /usr/share/man/man1/jarsigner.1 jarsigner.1 /usr/lib/jvm/java-7-oracle/man/man1/jarsigner.1
sudo update-alternatives --quiet --install /usr/bin/java-rmi.cgi java-rmi.cgi /usr/lib/jvm/java-7-oracle/bin/java-rmi.cgi 100
sudo update-alternatives --quiet --install /usr/bin/javac javac /usr/lib/jvm/java-7-oracle/bin/javac 100 --slave /usr/share/man/man1/javac.1 javac.1 /usr/lib/jvm/java-7-oracle/man/man1/javac.1
sudo update-alternatives --quiet --install /usr/bin/javadoc javadoc /usr/lib/jvm/java-7-oracle/bin/javadoc 100 --slave /usr/share/man/man1/javadoc.1 javadoc.1 /usr/lib/jvm/java-7-oracle/man/man1/javadoc.1
sudo update-alternatives --quiet --install /usr/bin/javah javah /usr/lib/jvm/java-7-oracle/bin/javah 100 --slave /usr/share/man/man1/javah.1 javah.1 /usr/lib/jvm/java-7-oracle/man/man1/javah.1
sudo update-alternatives --quiet --install /usr/bin/javap javap /usr/lib/jvm/java-7-oracle/bin/javap 100 --slave /usr/share/man/man1/javap.1 javap.1 /usr/lib/jvm/java-7-oracle/man/man1/javap.1
sudo update-alternatives --quiet --install /usr/bin/jconsole jconsole /usr/lib/jvm/java-7-oracle/bin/jconsole 100 --slave /usr/share/man/man1/jconsole.1 jconsole.1 /usr/lib/jvm/java-7-oracle/man/man1/jconsole.1
sudo update-alternatives --quiet --install /usr/bin/jdb jdb /usr/lib/jvm/java-7-oracle/bin/jdb 100 --slave /usr/share/man/man1/jdb.1 jdb.1 /usr/lib/jvm/java-7-oracle/man/man1/jdb.1
sudo update-alternatives --quiet --install /usr/bin/jhat jhat /usr/lib/jvm/java-7-oracle/bin/jhat 100 --slave /usr/share/man/man1/jhat.1 jhat.1 /usr/lib/jvm/java-7-oracle/man/man1/jhat.1
sudo update-alternatives --quiet --install /usr/bin/jinfo jinfo /usr/lib/jvm/java-7-oracle/bin/jinfo 100 --slave /usr/share/man/man1/jinfo.1 jinfo.1 /usr/lib/jvm/java-7-oracle/man/man1/jinfo.1
sudo update-alternatives --quiet --install /usr/bin/jmap jmap /usr/lib/jvm/java-7-oracle/bin/jmap 100 --slave /usr/share/man/man1/jmap.1 jmap.1 /usr/lib/jvm/java-7-oracle/man/man1/jmap.1
sudo update-alternatives --quiet --install /usr/bin/jps jps /usr/lib/jvm/java-7-oracle/bin/jps 100 --slave /usr/share/man/man1/jps.1 jps.1 /usr/lib/jvm/java-7-oracle/man/man1/jps.1
sudo update-alternatives --quiet --install /usr/bin/jrunscript jrunscript /usr/lib/jvm/java-7-oracle/bin/jrunscript 100 --slave /usr/share/man/man1/jrunscript.1 jrunscript.1 /usr/lib/jvm/java-7-oracle/man/man1/jrunscript.1
sudo update-alternatives --quiet --install /usr/bin/jsadebugd jsadebugd /usr/lib/jvm/java-7-oracle/bin/jsadebugd 100 --slave /usr/share/man/man1/jsadebugd.1 jsadebugd.1 /usr/lib/jvm/java-7-oracle/man/man1/jsadebugd.1
sudo update-alternatives --quiet --install /usr/bin/jstack jstack /usr/lib/jvm/java-7-oracle/bin/jstack 100 --slave /usr/share/man/man1/jstack.1 jstack.1 /usr/lib/jvm/java-7-oracle/man/man1/jstack.1
sudo update-alternatives --quiet --install /usr/bin/jstat jstat /usr/lib/jvm/java-7-oracle/bin/jstat 100 --slave /usr/share/man/man1/jstat.1 jstat.1 /usr/lib/jvm/java-7-oracle/man/man1/jstat.1
sudo update-alternatives --quiet --install /usr/bin/jstatd jstatd /usr/lib/jvm/java-7-oracle/bin/jstatd 100 --slave /usr/share/man/man1/jstatd.1 jstatd.1 /usr/lib/jvm/java-7-oracle/man/man1/jstatd.1
sudo update-alternatives --quiet --install /usr/bin/native2ascii native2ascii /usr/lib/jvm/java-7-oracle/bin/native2ascii 100 --slave /usr/share/man/man1/native2ascii.1 native2ascii.1 /usr/lib/jvm/java-7-oracle/man/man1/native2ascii.1
sudo update-alternatives --quiet --install /usr/bin/rmic rmic /usr/lib/jvm/java-7-oracle/bin/rmic 100 --slave /usr/share/man/man1/rmic.1 rmic.1 /usr/lib/jvm/java-7-oracle/man/man1/rmic.1
sudo update-alternatives --quiet --install /usr/bin/schemagen schemagen /usr/lib/jvm/java-7-oracle/bin/schemagen 100 --slave /usr/share/man/man1/schemagen.1 schemagen.1 /usr/lib/jvm/java-7-oracle/man/man1/schemagen.1
sudo update-alternatives --quiet --install /usr/bin/serialver serialver /usr/lib/jvm/java-7-oracle/bin/serialver 100 --slave /usr/share/man/man1/serialver.1 serialver.1 /usr/lib/jvm/java-7-oracle/man/man1/serialver.1
sudo update-alternatives --quiet --install /usr/bin/wsgen wsgen /usr/lib/jvm/java-7-oracle/bin/wsgen 100 --slave /usr/share/man/man1/wsgen.1 wsgen.1 /usr/lib/jvm/java-7-oracle/man/man1/wsgen.1
sudo update-alternatives --quiet --install /usr/bin/wsimport wsimport /usr/lib/jvm/java-7-oracle/bin/wsimport 100 --slave /usr/share/man/man1/wsimport.1 wsimport.1 /usr/lib/jvm/java-7-oracle/man/man1/wsimport.1
sudo update-alternatives --quiet --install /usr/bin/xjc xjc /usr/lib/jvm/java-7-oracle/bin/xjc 100 --slave /usr/share/man/man1/xjc.1 xjc.1 /usr/lib/jvm/java-7-oracle/man/man1/xjc.1

7. Create the JRE/JDK description file (named .java-7-oracle.jinfo) to use with update-java-alternatives with the following content:

echo 'alias=java-7-oracle
priority=100 
section=non-free

hl java /usr/lib/jvm/java-7-oracle/jre/bin/java
hl keytool /usr/lib/jvm/java-7-oracle/jre/bin/keytool
hl pack200 /usr/lib/jvm/java-7-oracle/jre/bin/pack200
hl rmid /usr/lib/jvm/java-7-oracle/jre/bin/rmid
hl rmiregistry /usr/lib/jvm/java-7-oracle/jre/bin/rmiregistry
hl unpack200 /usr/lib/jvm/java-7-oracle/jre/bin/unpack200
hl orbd /usr/lib/jvm/java-7-oracle/jre/bin/orbd
hl servertool /usr/lib/jvm/java-7-oracle/jre/bin/servertool
hl tnameserv /usr/lib/jvm/java-7-oracle/jre/bin/tnameserv
hl jexec /usr/lib/jvm/java-7-oracle/jre/lib/jexec
jre policytool /usr/lib/jvm/java-7-oracle/jre/bin/policytool
jdk appletviewer /usr/lib/jvm/java-7-oracle/bin/appletviewer
jdk apt /usr/lib/jvm/java-7-oracle/bin/apt
jdk extcheck /usr/lib/jvm/java-7-oracle/bin/extcheck
jdk idlj /usr/lib/jvm/java-7-oracle/bin/idlj
jdk jar /usr/lib/jvm/java-7-oracle/bin/jar
jdk jarsigner /usr/lib/jvm/java-7-oracle/bin/jarsigner
jdk java-rmi.cgi /usr/lib/jvm/java-7-oracle/bin/java-rmi.cgi
jdk javac /usr/lib/jvm/java-7-oracle/bin/javac
jdk javadoc /usr/lib/jvm/java-7-oracle/bin/javadoc
jdk javah /usr/lib/jvm/java-7-oracle/bin/javah
jdk javap /usr/lib/jvm/java-7-oracle/bin/javap
jdk jconsole /usr/lib/jvm/java-7-oracle/bin/jconsole
jdk jdb /usr/lib/jvm/java-7-oracle/bin/jdb
jdk jhat /usr/lib/jvm/java-7-oracle/bin/jhat
jdk jinfo /usr/lib/jvm/java-7-oracle/bin/jinfo
jdk jmap /usr/lib/jvm/java-7-oracle/bin/jmap
jdk jps /usr/lib/jvm/java-7-oracle/bin/jps
jdk jrunscript /usr/lib/jvm/java-7-oracle/bin/jrunscript
jdk jsadebugd /usr/lib/jvm/java-7-oracle/bin/jsadebugd
jdk jstack /usr/lib/jvm/java-7-oracle/bin/jstack
jdk jstat /usr/lib/jvm/java-7-oracle/bin/jstat
jdk jstatd /usr/lib/jvm/java-7-oracle/bin/jstatd
jdk native2ascii /usr/lib/jvm/java-7-oracle/bin/native2ascii
jdk rmic /usr/lib/jvm/java-7-oracle/bin/rmic
jdk schemagen /usr/lib/jvm/java-7-oracle/bin/schemagen
jdk serialver /usr/lib/jvm/java-7-oracle/bin/serialver
jdk wsgen /usr/lib/jvm/java-7-oracle/bin/wsgen
jdk wsimport /usr/lib/jvm/java-7-oracle/bin/wsimport
jdk xjc /usr/lib/jvm/java-7-oracle/bin/xjc' | sudo tee .java-7-oracle.jinfo

8. Activate the newly installed JDK (only necessary if another JVM was already installed):

sudo update-java-alternatives --set java-7-oracle

9. The Oracle JDK includes both the client and server VMs. The client VM is used by default, but the server VM can be used by specifying -server on the java command-line. To use the server VM by default, modify java-7-oracle/jre/lib/arm/jvm.cfg to specify -server before -client. For example:

echo '-server KNOWN
-client KNOWN
-hotspot ERROR
-classic WARN
-native ERROR
-green ERROR' | sudo tee java-7-oracle/jre/lib/arm/jvm.cfg

10. Finally, verify that the installation was successful, paying special attention to the VM type in the middle of the last line:

$ java -version
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) Client VM (build 23.2-b09, mixed mode)

$ java -server -version
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) Server VM (build 23.2-b09, mixed mode)