For information there is a way to deploy Nuxeo using the CloudFormation service from Amazon, which was released a few (...) after this blog post.Thanks for the valuable update.
You can check it out here: http://doc.nuxeo.com/x/VYCN Cheers, Roland / Nuxeo
In this tutorial we will try to explain how to install Nuxeo inside a “cloud computing” environment. We have decided to use Amazon services, concretely Amazon EC2 to do “cloud computing”.
- You must have an Amazon EC2 account.
- Download EC2 machines authentication keys
- You must have ssh access to computers.
With Amazon EC2 you may deploy virtual machines. Amazon has a computers repository with different SOs (Linux, Windows, …) for their multiple distributions (Ubuntu, Fedora, XP, Vista, …). Among these machines, in the Amazon EC2 repository there are public access machines and “payment-access” machines. At this point is important to say that any user may create a machine in Amazon EC2 and later sell it to other users to use it or to publish it free.
Now we are going to explain how to instanciate a virtual machine and install Nuxeo in it. The machine we are going to use to access via SSH to Amazon EC2 machines has a Ubuntu 9.04 Linux distribution.
FIRST STEP – Download Amazon keys
Go to http://aws.amazon.com/. Go to “Account → Security Credentials” section (Figure 1) and access with your user account (Figure 2). You will see a page with all neccessary information to securely controll your accesses. You must save in a safe place the “Access Key ID” (Figure 3) and download the “X.509 Certificate” (Figure 4). You can also know in that page which is your “Canonical User ID”, neccessary to make some operations over other Amazon services, as Amazon S3, which will allow to store data, as well as save virtual machines after being created and configured in EC2.
SECOND STEP - Instanciate a virtual machine in Amazon EC2
To instanciate a virtual machine in Amazon, you must go to “Your Account → AWS Management Console” (Figure 5). In that page push “Sign in to the AWS Console”. Then you will go to a web interface where you will be able to controll your “machines in the cloud” instances.
Click on “AMIs” (Amazon Machines Images) on the left menu. Then on “Viewing” click on “Public Images” in the dropdown menu, and on other menu which is right next click on “Ubuntu”. Once AMIs have been loaded, look for the better one for your objectives. In this example, we chose the machine with ID “ami-ccf615a5” which has an Ubuntu 9.04 image and which will do as a server (Figure 7).
Once you have found your machine, select it, right mouse click on it and choose “Launche Instances”. The images can be instanciated in different machines, with differente characteristics. You may choose which you prefer of them. In our case we have chosen these:
- Number of instances → 1
- Instance Type → Small (m1.small)
- Option “Launch Instances”
Click on “Continue” and leave default options. Click on “Continue” again. In this case you must create a new “key pair” if you haven't done it before. If there are some created, you can choose one of them. Click on “continue” and you will be able to create a security group, select default one or select one group created previously. In our case we choose the default. Click on “continue” and then on “Launch”.
All these steps may be done with the Amazon API. There is also a python library named “boto” which allows users to do faster these operations.
THIRD STEP - Install Nuxeo in the new machine
You first have to access via ssh to Amazon EC2. Open a terminal. In “AWS Managment Console” access to your instance information clicking on “Instances” on the left menu and then clicking over the machine you want to know its data. Copy its “Public DNS” (Figure 8), neccessary to ssh connection. You will also need the “key pair” assigned at step 2 (in this example our key-pair is “yerbabuena2” and the file is in /home/yseworker/ec2-keys/yerbabuena2.pem). The command used is:
ssh -i /home/yseworker/ec2-keys/yerbabuena2.pem root@ec2-***-***-***-**.compute-1.amazonaws.com
First time you enter, the application will ask you to continue. Choose “yes” and click return. Then you will automatically access to your machine at EC2.
Once you have the shell control of the machine of EC2, you will be able to install Nuxeo 5.3
- Update the machine you have accessed:
- download Nuxeo latest version:cd /opt
- Another option instead of download it is to copy the files you want from your local machine to amazon machine, using this command:scp -i /home/yseworker/ec2-keys/yerbabuena2.pem /home/yseworker/Escritorio/Descargas/nuxeo-dm-5.3.0-GA-jboss.zip root@ec2-***-***-***-**.compute-1.amazonaws.com:/root
- Once the file has been copied to your amazon machine, run from amazon machine:
- Be sure you have Java 1.6 in your machine
- Set JAVA_HOME to the correct path
- Be sure you also have installed OpenOffice
- Launch Server (inside the Nuxeo5.3 unzipped directory) cd nuxeo-dm-5.3.0-GA-jboss/bin
./run.sh -b 0.0.0.0
- Go to this web (notice the URL contains pulic DNS which with you accessed to the server via ssh):
Be careful if you close the terminal, because then your Nuxeo application will stop running in the server. To avoid this, you must run Nuxeo as a service (Step 4).
FOURTH STEP - Run Nuxeo as a service
To install Nuxeo as a service, you will have to rename (or copy) inside bin folder the jbossct.properties-sample file to jbossctl.properties. Then edit jbossctl file and in HOST change to 0.0.0.0.
Once you have completed this step, you will be able to execute it with command jbossctl start.
To check everything has gone well, you will see a few '.' being written at the console. When the server runs a message saying everything has gone well must be displayed. Then you can close the console.