This guide will show those who are not familiar with AWS how to initiate a server image with OpenAM pre-installed.
If you don’t have an account at AWS, you have to create one to this pre-configured image. Log in at http://aws.amazon.com/console/
The OpenAM image is based upon the “small” instance type (1.7 GB RAM) which is an instance type which will be charged by default Amazon rates.
The default EC2 instances will get a new IP and therefor also a new FQDN (Public DNS) name every time it get’s restarted. To avoid this allocate a “Elastic IP” to the instance which can be associate with the new OpenAM instance.
- Click the “Launch Instance” button from your instance menu
- Select “Community AMIs”
- Search for ForgeRock among “All Images” (take some time to load)
- From the list of ForgeRock AMI’s click the “Select” button on the OpenAM entry
- Select “Small (m1.small, 1.7 GB)” from the Instance type. OpenAM needs more RAM then the Micro instance can provide with 640MB.
- Create a “Key Pair” if you don’t have any.
- Create a “Security Group” if you don’t have any with the port 22 (SSH) and 8080(Tomcat/OpenAM) open for access
- Click “Launch”
- Associate the instance with a static IP from the Elastic IP pool
- Point your browser to the IP/Public DNS on port 8080 and /openam
Manual creation a instance from scratch
- Select the “Basic 32-bit Amazon Linux AMI 2011.09 (AMI Id: ami-24506250)”,
- Choose 1 instance select “Small (m1.small, 1.7 GB)” for the “Instance Type”, OpenAM needs memory
- Add some description to the instance
- Add some key/value pair to the instance
- Create a key pair (if you don’t already have one you could use for SSH for this instance)
- Choose the “OpenAM” security group previously created.
- Click on “Lanuch” to create the instance, and make it active.
Install the software
Connect to the EC2 instance using your encrypted key previously created and downloaded locally. Connect using ssh similar to this command with your own unique hostname.
ssh -i .ec2/openam.pem firstname.lastname@example.org
When logged in then you can start installing the necessary software.
- sudo yum install tomcat6
- sudo /sbin/chkconfig –level 2345 tomcat6 on
- just to make Tomcat start on boot
- cd /usr/share/tomcat6/webapps
- sudo wget http://download.forgerock.org/downloads/openam/snapshot9.5/openam_953.war
- Download the version of OpemAM you would like to install
- sudo mv openam_953.war openam.war
- The name of the war file will also be the name of the web context be default
- sudo chown -R tomcat /usr/share/tomcat6/
- Change the file ownership to tomcat for all related files. The Tomcat process will run default as “tomcat” as the owner.
- sudo vi /etc/tomcat6/tomcat6.conf
- Open the tomcat config file in a text editor
- Add the following to the JAVA_OPTS environment variable: -Xmx1024m -XX:MaxPermSize=256m
- This is the recommended setup for OpenAM
- sudo /sbin/service tomcat6 start
- Starts the Tomcat deamon, and deploys OpenAM
Then you can point your browser to the instance hostname like: