Differences

This shows you the differences between two versions of the page.

Link to this comparison view

debops-pinning:start [2017/01/13 22:14] (current)
jbicha moved from [[debops-pinning:start]]
Line 1: Line 1:
 +# Howto for creating a self contained and pinned debops project
  
 +This shows a way how to pin (or freeze) all roles from a debops project. That way its possible to get the exact setup working again month later.
 +
 +<​code>​
 +# create a virtualenv
 +$ mkdir projectname-owncloud
 +$ cd projectname-owncloud
 +$ virtualenv-2.7 .
 +# activate virtualenv
 +$ source bin/​activate
 +# Installl debops & ansible inside this env
 +$ bin/pip install debops==0.4.3
 +$ bin/pip install ansible==1.9.4
 +# Clone the debops playbook (cant get installed by ansible-galaxy):​
 +$ git clone https://​github.com/​debops/​debops-playbooks.git debops-playbooks
 +$ cd debops-playbooks
 +# Pin the debops-playbook
 +$ git checkout 0e03a291414b37d040094367497770bc514b6089
 +$ cd ..
 +# Create a requirements.yml
 +# This one is a ownCloud Server version 8.1.4 with all deps from 18.11.2015
 +</​code>​
 +<​code>​
 +---
 +
 + # from github, overriding the name and specifying a specific tag
 +- src: https://​github.com/​debops/​ansible-owncloud.git
 +  version: 0cbfa31ba246914bd6ca696612ecf237996df729
 +  name: debops.owncloud
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-secret.git
 +  version: v0.2.2
 +  name: debops.secret
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-mariadb.git
 +  version: v0.1.1
 +  name: debops.mariadb
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-postgresql.git
 +  version: v0.2.0
 +  name: debops.postgresql
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-php5.git
 +  version: 4ba1524ee8bc58f2a7181beb77a3f001fcb13638
 +  name: debops.php5
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-nginx.git
 +  version: 7dbdea4d19389a1cdbaf8d9ded44bf16317e4d7f
 +  name: debops.nginx
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-core.git
 +  version: v0.1.2
 +  name: debops.core
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-apt_preferences.git
 +  version: v0.1.2
 +  name: debops.apt_preferences
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-etc_services.git
 +  version: 9cde2a0c287d485dee73d705c4c95170cc4b6070
 +  name: debops.etc_services
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-atd.git
 +  version: v0.1.2
 +  name: debops.atd
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-dhparam.git
 +  version: 41835b49d4d65d60d3032f74607edf7441c50725
 +  name: debops.dhparam
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-pki.git
 +  version: 964105f948191bc213dc1b909ace293cc5707f8e
 +  name: debops.pki
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-auth.git
 +  version: v0.3.0
 +  name: debops.auth
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-apt.git
 +  version: c4a9f07ae64d06f267e96f87e676150de123daac
 +  name: debops.apt
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-ferm.git
 +  version: v0.1.3
 +  name: debops.ferm
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-tcpwrappers.git
 +  version: 221a0ea268df5cce76eb3c5a3c60846c92c7af17
 +  name: debops.tcpwrappers
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-ntp.git
 +  version: v0.1.0
 +  name: debops.ntp
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-ifupdown.git
 +  version: 404549b516b6e18d121dfab5d6910ceb0c88bb14
 +  name: debops.ifupdown
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-console.git
 +  version: c7b5d979b871c8feae3b8c4d09d577092b7dbdba
 +  name: debops.console
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-postfix.git
 +  version: 8540a70d921d484e6dbb326f1d126fd22543dee2
 +  name: debops.postfix
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-rsyslog.git
 +  version: d5651c34cc5eaefed24ea97776032abec8a2d3f2
 +  name: debops.rsyslog
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-users.git
 +  version: 2b35f717b6d3ac5d57352ef9fcc1cf0653ec1d60
 +  name: debops.users
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-sshkeys.git
 +  version: 604b760dfbaa8f5af8fedf3642b807dad7db4957
 +  name: debops.sshkeys
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-sshd.git
 +  version: v0.2.2
 +  name: debops.sshd
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-directories.git
 +  version: 7da071cc3099217b3c72fbd468e60390917ec45b
 +  name: debops.directories
 +  path: roles/
 +
 +- src: https://​github.com/​debops/​ansible-bootstrap.git
 +  version: 5538397532aacf92a148249f543a76da3c694fb1
 +  name: debops.bootstrap
 +  path: roles/
 +</​code>​
 +<​code>​
 +# Install the pinned dependencies from requirements.yml
 +# "​-n"​ does not load dependencies "​--force"​ Overrides as we know what we doing:
 +$ ansible-galaxy install -nr requirements.yml --force
 +# Change the path in .debops.cfg to the role:
 +[paths]
 +playbooks-paths = debops-playbooks/​playbooks
 +</​code>​
 +<​code>​
 +# Wire the needed playbooks together in ansible/​playbooks/​site.yml:​
 +---
 +
 +- include: ../​../​debops-playbooks/​playbooks/​common.yml
 +
 +- include: ../​../​debops-playbooks/​playbooks/​srv/​mariadb.yml
 +
 +- include: ../​../​debops-playbooks/​playbooks/​srv/​mariadb_server.yml
 +
 +- include: ../​../​debops-playbooks/​playbooks/​app/​owncloud.yml
 +</​code>​
Print/export