Welcome to the inauguration of the 5 Minutes Stacks series !
Regularly, Cloudwatt will publish on his technical blog and his github, applicative stacks with their associated deployement guide. Its goal is to facilitate your life while starting up projects. The procedure takes few minutes to prepare and 5 minutes to deploy.
Once the stack is deployed, you become its master and you can immediately play with it.
If you have any questions, remarks or enhancement requests, do not hesitate to open an issue on the github or to submit a pull request.
The deployement base is an Ubuntu trusty instance. The Apache and MySQL servers are deployed on a single instance.
Per default, the script is proposing a deployement on an instance type “Small” (s1.cw.small-1). Instances are charged by the minute and capped at their monthly price (you can find more details on the Tarifs page on the Cloudwatt website). Obviously, you can adjust the stack parameters, particularly its defaut size.
If you do not like command lines, you can go directly to the “run it thru the console” section by clicking here
Once you have cloned the github, you will find in the
bundle-trusty-lamp.heat.yml: HEAT orchestration template. It will be use to deploy the necessary infrastructure.
stack-start.sh: Stack launching script. This is a small script that will save you some copy-paste.
stack-get-url.sh: Flotting IP recovery script.
Have your Cloudwatt credentials in hand and click HERE. If you are not logged in yet, you will go thru the authentication screen then the script download will start. Thanks to it, you will be able to initiate the shell acccesses towards the Cloudwatt APIs.
Source the downloaded file in your shell. Your password will be requested.
$ source COMPUTE-[...]-openrc.sh Please enter your OpenStack Password:
Once this done, the Openstack command line tools can interact with your Cloudwatt user account.
bundle-trusty-lamp.heat.yml file, you will find at the top a section named
parameters. The sole mandatory parameter to adjust is the one called
default value must contain a valid keypair with regards to your Cloudwatt user account. This is within this same file that you can adjust the instance size by playing with the
heat_template_version: 2013-05-23 description: Basic all-in-one LAMP stack parameters: keypair_name: default: amaury-ext-compute <-- Indicate here your keypair description: Keypair to inject in instances type: string flavor_name: default: s1.cw.small-1 <-- indicate here the flavor size description: Flavor to use for the deployed instance type: string constraints: - allowed_values: - s1.cw.small-1 - n1.cw.standard-1 - n1.cw.standard-2 - n1.cw.standard-4 - n1.cw.standard-8 - n1.cw.standard-12 - n1.cw.standard-16 [...]
In a shell, run the script
stack-start.sh with the name you want to give it as parameter:
Last, wait 5 minutes until the deployement been completed.
start-stack.sh script is taking care of running the API necessary requests to:
Once all of this done, you can run the
stack-get-url.sh script. It will gather the entry url of your stack.
Yes ! Using the console, you can deploy a LAMP server:
The stack will be automatically created (you can see its progress by clicking on its name). When all its modules will become “green”, the creation will be completed. Then you can go on the “Instances” menu to discover the flotting IP value that has been automatically generated. Now, just run this IP adress in your browser and enjoy !
It is (already) FINISH !
The goal of this tutorial is to accelarate your start. At this point you are the master of the stack.
You have a SSH access point on your virtual machine thru the flotting IP and your private keypair (default user name
You can start building your internet website on your virtual instance. Its entry access points are:
/etc/apache2/sites-available/default-cw.conf: default Apache configuration
/var/www/cw: the deployement repository of the little php website exemple
Have fun. Hack in peace.