Created
July 16, 2015 08:12
-
-
Save ellipsonic/99a30d6182d66065fd35 to your computer and use it in GitHub Desktop.
Yaml file to bring up magento instance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MyApache | |
# New mysql profile for apache | |
# Globals | |
globals: [] | |
version: 0 | |
name: 'Apache server' | |
description: 'New apache server' | |
# Interfaces | |
requires: | |
- | |
subtype: "mysql" | |
multi: false | |
type: "database" | |
name: "mysqldb" | |
attributes: | |
- | |
name: ip | |
- | |
name: port | |
- | |
name: user | |
- | |
name: password | |
provides: [] | |
# Events | |
events: | |
init: | |
type: script | |
show: false | |
timeout: 300 | |
script: "#!/bin/bash\n \n#Instructions to use this script \n#\n#chmod +x SCRIPTNAME.sh\n#\n#sudo ./SCRIPTNAME.sh\n \necho \"###################################################################################\"\necho \"Please be Patient: Installation will start now.......and it will take some time :)\"\necho \"###################################################################################\"\n \n#Update the repositories\napt-get update \napt-get -y install sudo\napt-get -y install nano\n \nsudo su\n \nsudo apt-get update\n \n#Apache, Php, MySQL and required packages installation\n \nsudo apt-get -y install apache2 \nsudo apt-get -y install php5 \nsudo apt-get -y install libapache2-mod-php5 \nsudo apt-get -y install php5-mcrypt \nsudo apt-get -y install php5-curl \nsudo apt-get -y install php5-mysql \nsudo apt-get -y install php5-gd \nsudo apt-get -y install php5-cli \nsudo apt-get -y install php5-dev \nsudo apt-get -y install mysql-client\n \nsudo apt-get -y install php5enmod \nsudo apt-get -y install php5-mcrypt \nsudo apt-get -y install curl\nsudo apt-get -y install git \n \n# Cleanup the default HTML file created by Apache\nrm -f /usr/share/apache2/default-site/index.html\nrm -f /var/www/index.html\n \n# Git all php files\ngit clone https://github.com/ellipsonic/magekart_app.git .\ngit checkout app_server\nclear\ngit branch\nsleep 2s\nchmod -R o+w media\nchmod 755 mage\n \ncd errors\nmv local.xml.sample local.xml\nsudo apt-get -y install php5-gd php5-mysql\nsudo service apache2 restart\ncd /var/www/errors\nmv local.xml local.xml.sample\n \n# Publish result\na2enmod rewrite\nsudo service apache2 restart\n \n \n#Restart all the installed services to verify that everything is installed properly\necho -e \"undefinedn\"\n \nservice apache2 restart > /dev/null\n \necho -e \"undefinedn\"\n \nif [ $? -ne 0 ]; then\n echo \"Please Check the Install Services, There is some $(tput bold)$(tput setaf 1)Problem$(tput sgr0)\"\nelse\n echo \"Installed Services run $(tput bold)$(tput setaf 2)Sucessfully$(tput sgr0)\"\nfi\n \n \nclear\n \npubilc_ip=$(curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//')\nsudo sed -i ''s/localhost/pubilc_ip/g'' /var/www/app/code/core/Mage/Core/Model/Config.php" | |
files: [] | |
fetch: [] | |
connect_mysqldb: | |
type: script | |
show: false | |
timeout: 300 | |
script: "sudo sed -i 's/localhost/{{mysqldb.ip}}/g' /var/www/app/etc/local.xml" | |
files: [] | |
fetch: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment