On Github MichaelBitard / chroot_presentation
Si quelque chose évolue, tenter de mettre à jour la chroot et la repackager
Conseil : à tester sur des petits projets
Chroot minimaliste avec configuration automatisée.
VS
2 modes : Client/Server ou standalone
“Puppet is a tool designed to manage the configuration of Unix-like and Microsoft Windows systems declaratively.”Principe
Installation sur le poste client (apt-get install puppet)
Déclaration des actions dans des fichiers .pp
Déclaration des dépendances entre les actions
package {['man-db', 'wget', 'ngrep', 'tree', 'curl',
'bash-completion', 'language-pack-fr',
'gitk', 'bc', 'ccze',
'vim', 'vim-puppet','unzip','time',
'logrotate', 'sysstat', 'tmux', 'xclip', 'firefox',
'libcanberra-gtk0', # Remove warning when launching firefox, better theme
'x11-xkb-utils','xinput', 'x11-xserver-utils', 'xsltproc', 'msmtp',
'sshfs',
'meld','scite','make', 'python-docutils',
'rdesktop', 'x11vnc', 'vinagre', 'ack-grep', 'imagemagick',
'feh',
'python-setuptools', 'pdfgrep', 'evince', 'python-demjson',
'telnet', 'gnome-keyring', 'pssh'
]: ensure => installed ,}
package { "git-svn": ensure => installed }
class intellij ( $username ) {
$idea_location="/home/nfc/applications"
$idea_archive="ideaIC-12.1.tar.gz"
exec { "mkdir -p $idea_location &&
tar xzf /tmp/$idea_archive -C $idea_location &&
chown -R $username:$username $idea_location" :
alias => "install_idea",
unless => "test -d $idea_location/idea-IC-129*",
require => Download_File["download_idea"],
}
download_file { "$idea_archive" :
alias => "download_idea",
site => "http://download-ln.jetbrains.com/idea",
cwd => "/tmp",
unless => "test -d $idea_location/idea-IC-129*
|| test -d /tmp/$idea_archive",
}
}
Chroot Contactless chez MBS
3 équipes (bonne idée?)
41G dont 1G de .m2
1523 lignes de code puppet
41 fichiers puppet
80 fichiers
16493 lignes tout fichiers confondus
Il faut maintenir $$Principe
Installation sur le serveur (git clone)
Déclaration des taches dans des fichiers .yml
Regroupement des taches dans des playbooks
Lancement d'ansible via ssh
- hosts: gitlab
sudo: yes
tasks:
- name: ensure app apt dependencies are installed
action: apt pkg=$item
with_items:
- build-essential
- zlib1g-dev
- libyaml-dev
- libssl-dev
- libgdbm-dev
- libreadline-dev
- libncurses5-dev
- libffi-dev
- curl
- git-core
- redis-server
- checkinstall
- libxml2-dev
- libxslt1-dev
- libcurl4-openssl-dev
- libicu-dev
- python-docutils
- libmysqlclient-dev
- python-mysqldb
# 4. GitLab shell
- hosts: gitlab
sudo: yes
sudo_user: git
vars_files:
- vars.yml
tasks:
- name: ensure Gitlab-Shell git repository is cloned
git: repo=https://github.com/gitlabhq/gitlab-shell.git dest=/home/git/gitlab-shell version=v1.7.1
- name: ensure gitlab-shell config is written
action: template src=templates/gitlab_shell_config.yml.tmpl dest=/home/git/gitlab-shell/config.yml mode=0755
- name: ensure gitlab-shell is installed
command: /home/git/gitlab-shell/bin/install
Il faut automatiser... jusqu'à quel point?