We Will Use a Simple Cloud-Init Script For WordPress Auto Installation on HP Cloud’s OpenStack Client Infrastructure. Script is Provided Here in This Guide. You should read the previous article about cloud-init to get started. These falls among the class called cloud automation. You should not use if you are a newbie – we suggest to learn about the unix commands instead of using automated methods from the beginning.
WordPress Auto Installation : HP Cloud + Cloud-Init Script
This creates a LAMP server configuration. Nowadays we use Nginx to speed up. This is an example, tested script :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #cloud-config packages: - apache2 - php5 - php5-mysql - mysql-server runcmd: - wget http://wordpress.org/latest.tar.gz -P /tmp/ - tar -zxf /tmp/latest.tar.gz -C /var/www/ - mysql -e "create database wordpress; create user 'wpuser'@'localhost' identified by 'changemetoo'; grant all privileges on wordpress . \* to 'wpuser'@'localhost'; flush privileges;" - mysql -e "drop database test; drop user 'test'@'localhost'; flush privileges;" - mysqladmin -u root password 'changepass' |
Edit the runcmd:
parameters above under mysql
, change it with your username and password. /var/lib/cloud
directory will have useful information, lgo files can be found in /var/log/cloud-init.log
, copy of cloud-config will be stored in /var/lib/cloud/instance/cloud-config.txt
.
---
We kept a gist here on Github.
WordPress Auto Installation : Where to Place Cloud-Init Script on HP Cloud?
Here you’ll put the script and then press the button to create the instance :
It is better to work from Horizon those who are new both to HP Cloud and OpenStack. We can, use this script from command line without any need of using the web GUI.
Do not send complains or start an issue on Github without the error logs. Without log and other minimal data, we can not debug.
Tagged With NRVL