LAMP is a web server composed by 4 open-source tools: - Linux for the Operating System which host the server - Apache for the HTTP server which is in link with the client - MySQL for the databases server - PHP to execute dynamic web pages
The deployement base is an Ubuntu xenial instance. The Apache and MySQL servers are deployed on a single instance.
… Good! Go to the Apps page on the Cloudwatt website, choose the apps, press DEPLOY and follow the simple steps… 2 minutes later, a green button appears… ACCESS: you have your Wordpress!.
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 !
If you like only the command line, you can go directly to the “CLI launch” version by clicking this link
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
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-xenial-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-xenial-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: 2015-04-30 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.
Have fun. Hack in peace.