All Projects → valentinocossar → trellis-database-uploads-migration

valentinocossar / trellis-database-uploads-migration

Licence: MIT license
Ansible playbook for Trellis that manages database and uploads migration.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to trellis-database-uploads-migration

Opstools Ansible
This is outdated, not tested and not supported in any case.
Stars: ✭ 78 (-17.89%)
Mutual labels:  ansible-playbooks
enveigle
Deceive Ansible to template Trellis .env files to local Bedrock
Stars: ✭ 18 (-81.05%)
Mutual labels:  trellis
trellis-sync
Trellis Database and Uploads Folder Synchronisation scripts and example WP CLI Aliases
Stars: ✭ 27 (-71.58%)
Mutual labels:  trellis
Vagrant Box Templates
Stars: ✭ 100 (+5.26%)
Mutual labels:  ansible-playbooks
Ansible Kubernetes Openshift Pi3
Ansible playbooks for setting up a Kubernetes Raspberry Pi 3 cluster
Stars: ✭ 189 (+98.95%)
Mutual labels:  ansible-playbooks
tiller-circleci
Deploy Trellis, Bedrock and Sage via CircleCI
Stars: ✭ 14 (-85.26%)
Mutual labels:  trellis
Splunkenizer
Ansible framework providing a fast and simple way to spin up complex Splunk environments.
Stars: ✭ 73 (-23.16%)
Mutual labels:  ansible-playbooks
ansiblecheck
One Stop Solution For Checking Your Ansible Roles and Playbooks
Stars: ✭ 56 (-41.05%)
Mutual labels:  ansible-playbooks
Ansible Playbooks
Ansible Playbook for Icinga 2
Stars: ✭ 224 (+135.79%)
Mutual labels:  ansible-playbooks
bedrock-site-protect
Ansible role: Add htpasswd protection to Trellis (Bedrock-Ansible) WordPress sites.
Stars: ✭ 79 (-16.84%)
Mutual labels:  trellis
Linchpin
ansible based multicloud orchestrator
Stars: ✭ 107 (+12.63%)
Mutual labels:  ansible-playbooks
Pimp My Box
🌱 Automated seedbox install of rTorrent-PS and PyroScope CLI etc. via Ansible.
Stars: ✭ 127 (+33.68%)
Mutual labels:  ansible-playbooks
ansible-palybooks
Ansible Palybooks Written and Published by www.server-computer.com. NO WARRANTY for any damages and loss of data.
Stars: ✭ 24 (-74.74%)
Mutual labels:  ansible-playbooks
Openbsd Cookbooks
Setup environment in OpenBSD using Ansible playbook
Stars: ✭ 80 (-15.79%)
Mutual labels:  ansible-playbooks
virk
SAS Viya Infrastructure Resource Kit (VIRK). Tools and utilities to help SAS customers with SAS Viya readiness.
Stars: ✭ 29 (-69.47%)
Mutual labels:  ansible-playbooks
Portable Ansible
Ansible without requirements to be installed (for pull-mode)
Stars: ✭ 75 (-21.05%)
Mutual labels:  ansible-playbooks
susa
High Performance Computing (HPC) and Signal Processing Framework
Stars: ✭ 55 (-42.11%)
Mutual labels:  trellis
swiss-army
Ansible-driven configuration management for maintaining a preferred environment (base system and app dotfiles / configurations)
Stars: ✭ 44 (-53.68%)
Mutual labels:  ansible-playbooks
SDDC.Lab
Ansible playbooks for automated deployment and configuration of a nested vSphere environment with NSX-T
Stars: ✭ 117 (+23.16%)
Mutual labels:  ansible-playbooks
bane
Chainlink security and orchestration tools for Ubuntu server
Stars: ✭ 6 (-93.68%)
Mutual labels:  ansible-playbooks

🎩 trellis-database-uploads-migration

Ansible playbook for Trellis that manages database and uploads migration. Inspired by hamedb89/trellis-db-push-and-pull.

⚙️ Installation

  1. Download latest release
  2. Copy CHANGELOG-TRELLIS-DATABASE-UPLOADS-MIGRATION.md file into Trellis root folder (so you can always know the version of the tool you are using)
  3. Copy all *.yml files into Trellis root folder
  4. Copy all bin/*.sh files into Trellis bin folder
  5. Add database_backup/* to the end of the Bedrock .gitignore file
  6. Set alias for host files as mentioned below in the hosts configuration section

‼️ Important

  • Tested up to Ansible 2.6.1
  • This tool doesn't work with Ansible 2.4.1.0 due to a bug (see #9)
  • The development vagrant VM must be powered on every time you run a command, this because the tool checks if the site folder exists and its name is the same of the local_path parameter in wordpress_sites.yml
  • The database_backup folder inside Bedrock will be automatically created if doesn't exist
  • I recommend you to not perform git operations while running ./bin/database.sh command, this because the tool uses the Bedrock folder as temp folder to store database dump before importing/exporting it and then delete it
  • To support url search and replace for Trellis 0.9.8 and lower, remove .canonical from variables url_from and url_to in the files database-pull.yml and database-push.yml
  • This tool hasn't been tested with a multisite configuration, any help with this implementation would be appreciated
  • This tool has only been tested with macOS and Ubuntu 18.04 LTS, any help with other operating systems would be appreciated

🏄 Usage

  • Run ./bin/uploads.sh <environment> <site name> <mode>
  • Run ./bin/database.sh <environment> <site name> <mode>

📌 Tips

  • Available <mode> options for uploads task: push, pull
  • Available <mode> options for database task: push, pull, backup
  • The push is for sending to the selected environment and the pull for receiving from it
  • The backup is for backup the database of the selected environment

🛠 Hosts configuration

Development

[development]
development_host ansible_host=192.168.50.5 ansible_connection=ssh ansible_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/default/virtualbox/private_key ansible_ssh_extra_args="-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ForwardAgent=yes"

[web]
development_host ansible_host=192.168.50.5 ansible_connection=ssh ansible_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/default/virtualbox/private_key ansible_ssh_extra_args="-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ForwardAgent=yes"

Staging

[staging]
staging_host ansible_host=your_server_hostname

[web]
staging_host ansible_host=your_server_hostname

Production

[production]
production_host ansible_host=your_server_hostname

[web]
production_host ansible_host=your_server_hostname

🤝 Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].