Difference between revisions of "Vagrant"
(11 intermediate revisions by the same user not shown) | |||
Line 16: | Line 16: | ||
vagrant --help |
vagrant --help |
||
</pre> |
</pre> |
||
+ | |||
⚫ | |||
+ | Installer Vagrant |
||
+ | |||
+ | ==Premiers pas== |
||
<pre> |
<pre> |
||
+ | git clone https://github.com/coreos/coreos-vagrant.git |
||
⚫ | |||
+ | cd coreos-vagrant |
||
</pre> |
</pre> |
||
+ | Modifier les fichiers user_data et config.rb |
||
⚫ | |||
+ | <pre> |
||
+ | # Lancement du cluster |
||
⚫ | |||
+ | vagrant list |
||
⚫ | |||
+ | |||
⚫ | |||
+ | vagrant ssh-config core-01 |
||
+ | |||
+ | vagrant ssh core-01 |
||
+ | </pre> |
||
+ | |||
+ | Une fois loggé |
||
+ | <pre> |
||
+ | ifconfig |
||
+ | |||
+ | fleetctl list-machines |
||
+ | |||
+ | fleetctl list-units |
||
+ | |||
+ | fleetctl list-unit-files |
||
+ | |||
+ | ping IPPUB-DE-core-02 |
||
+ | </pre> |
||
+ | |||
+ | Depuis n'importe quel répertoire |
||
+ | <pre> |
||
+ | vagrant global-status |
||
+ | |||
+ | vagrant ssh 1a2b3c4d |
||
+ | </pre> |
||
+ | |||
+ | |||
+ | |||
+ | Depuis coreos-vagrant/ |
||
+ | <pre> |
||
+ | vagrant halt core-02 |
||
+ | |||
+ | vagrant status |
||
+ | |||
+ | vagrant global-status |
||
+ | |||
+ | vagrant up core-02 |
||
+ | </pre> |
||
+ | |||
+ | <pre> |
||
+ | # Arret du cluster |
||
+ | vagrant halt |
||
+ | |||
+ | vagrant status |
||
+ | </pre> |
||
+ | |||
+ | Voir [[fleet]] et [[etcd]]. |
||
+ | |||
+ | ==Clustering== |
||
+ | |||
+ | https://coreos.com/blog/coreos-clustering-with-vagrant/ |
||
+ | |||
+ | |||
+ | <pre> |
||
+ | eval `ssh-agent -s` |
||
+ | ssh-add -l |
||
+ | ssh-add ~/.vagrant.d/insecure_private_key |
||
+ | vagrant ssh core-01 -- -A |
||
+ | </pre> |
||
+ | |||
+ | La suite : TODO |
||
+ | |||
+ | =AWS= |
||
+ | |||
+ | <pre> |
||
+ | vagrant plugin install vagrant-aws |
||
+ | |||
+ | vagrant up --provider=aws |
||
+ | </pre> |
||
+ | |||
+ | La suite dans |
||
+ | * http://www.iheavy.com/2014/01/16/how-to-deploy-on-amazon-ec2-with-vagrant/ |
||
+ | * https://github.com/mitchellh/vagrant-aws/ |
Latest revision as of 22:35, 1 June 2015
Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team.
To achieve its magic, Vagrant stands on the shoulders of giants. Machines are provisioned on top of VirtualBox, VMware, AWS, or any other provider. Then, industry-standard provisioning tools such as shell scripts, Chef, or Puppet, can be used to automatically install and configure software on the machine.
Installation
Suivre l'installation http://docs.vagrantup.com/v2/installation/
Premiers pas
Command Lines http://docs.vagrantup.com/v2/cli/index.html
vagrant --help
CoreOS avec Vagrant
Installer Vagrant
Premiers pas
git clone https://github.com/coreos/coreos-vagrant.git cd coreos-vagrant
Modifier les fichiers user_data et config.rb en suivant https://coreos.com/docs/running-coreos/platforms/vagrant/
# Lancement du cluster vagrant up vagrant list vagrant ssh-config core-01 vagrant ssh core-01
Une fois loggé
ifconfig fleetctl list-machines fleetctl list-units fleetctl list-unit-files ping IPPUB-DE-core-02
Depuis n'importe quel répertoire
vagrant global-status vagrant ssh 1a2b3c4d
Depuis coreos-vagrant/
vagrant halt core-02 vagrant status vagrant global-status vagrant up core-02
# Arret du cluster vagrant halt vagrant status
Clustering
https://coreos.com/blog/coreos-clustering-with-vagrant/
eval `ssh-agent -s` ssh-add -l ssh-add ~/.vagrant.d/insecure_private_key vagrant ssh core-01 -- -A
La suite : TODO
AWS
vagrant plugin install vagrant-aws vagrant up --provider=aws
La suite dans