Learn how to set up an EC2 machine on AWS.
Download the pre-requisites, the installer & run the Installer pre script on Amazon EC2
Choose an Image for your Instance |
---|
Update Firewall Rules |
---|
Choose Instance Resource Flavor |
---|
![]() |
Instance Options Menu |
---|
Add the downloaded certificate my-key-pair.pem file of Step 2 to your local .ssh folder:
# copy certificate to your ssh folder > mv my-key-pair.pem ~/.ssh/my-key-pair.pem > cd ~/.ssh/ > chmod 400 my-key-pair.pem # connect to the machine using certificate > ssh -i my-key-pair.pem ubuntu@machine-ip-address |
Once you SSH to the machine, you can download and run the installer pre installation script to get all the dependencies so that cloud deployment works.
# download update apt-get, download nodejs-legacy, npm and zip > sudo su > apt-get update && apt install nodejs-legacy npm zip # download installer > mkdir -p /opt/soajs/node_modules > cd /opt/soajs/node_modules > sudo npm install soajs.installer # run installer pre script > cd soajs.installer/scripts/pre > sudo /opt/soajs/node_modules/soajs.installer/scripts/pre/docker-linux.sh <%YOUR_CUSTOM_DOMAIN%> |
Zip and Download the generated docker certificates from the above step to your local machine.
> cd ~ > zip -r certs.zip certs/* > mv ~/certs.zip /home/ubuntu/ |
From here on, use the installer from your local machine to deploy SOAJS on the remote EC2 machine you created. |