git clone git@bitbucket.org:traackr/bi.git
> cd bi
> vagrant up
> git checkout vagrant
(for now)
>
1. Vagrantfile
2. provisioning-start.sh
3. provisioning.yml
Vagrantfile
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.synced_folder "./", "/vagrant",
owner: 'vagrant', group: 'www-data',
mount_options: ["dmode=775"]
config.vm.provision "shell", privileged: false,
path: "provisioning/provisioning-start.sh"
ubuntu/trusty64
forwarded_port
provisioning/provisioning-start.sh
shell
8080
80
vagrant
www-data
dmode=775
provisioning-start.sh
sudo apt-get install -y git ansible
git clone git@bitbucket.org:traackr/ansible-playbooks.git ansible-playbook provisioning.yml --connection=local
mina app_config servers=localhost
mina update_dependencies servers=localhost
mina sql_migration servers=localhost
mina restart_apache servers=localhost
servers=localhost
--connection=local
ansible
ansible-playbook
mina
provisioning.yml
roles:
- { role: common }
- { role: apache }
- { role: mysql }
tasks:
- gem: name=mina-traackr user_install=no state=present
- gem: name=mina-cakephp user_install=no state=present
- gem: name=sass version="3.2" user_install=no state=present
- s3: bucket=app-mysql-backups object=app_latest.sql.gz
- mysql_db: state=import target=app_latest.sql.gz
- mysql_db: state=import target=reset-db-password.sql
common
apache
mysql
app_latest.sql.gz
reset-db-password.sql
import
app_latest.sql.gz
s3
+
|
|