Vagrant : Différence entre versions
De Asso Val Libre
(→Bases) |
|||
(15 révisions intermédiaires par le même utilisateur non affichées) | |||
Ligne 4 : | Ligne 4 : | ||
sudo apt-get install vagrant | sudo apt-get install vagrant | ||
− | Vagrant est développé en Ruby. | + | Vagrant est développé en [[Ruby]]. |
vagrant box list | vagrant box list | ||
: There are no installed boxes! Use `vagrant box add` to add some. | : There are no installed boxes! Use `vagrant box add` to add some. | ||
+ | |||
+ | == Bases == | ||
+ | |||
+ | vagrant help | ||
+ | |||
+ | vagrant box list | ||
+ | |||
+ | vagrant init <box> / vagrant up | ||
+ | |||
+ | vagrant ssh | ||
+ | |||
+ | ; État global : | ||
+ | vagrant status | ||
+ | Current machine states: | ||
+ | default running (virtualbox) | ||
+ | The VM is running. [...] | ||
+ | |||
+ | ; Retrait de box : | ||
+ | vagrant box remove ubuntu/jammy64 | ||
+ | vagrant box remove --all | ||
+ | |||
+ | ; Mise à jour d'une box vagrant existante : | ||
+ | vagrant box update | ||
+ | |||
+ | |||
+ | ~/.vagrant.d/ | ||
+ | |||
+ | == TOP5 == | ||
+ | |||
+ | {{TOP5}} | ||
+ | |||
+ | * https://ostechnix.com/vagrant-tutorial-getting-started-with-vagrant/ | ||
+ | |||
+ | = Attention = | ||
+ | |||
+ | == Versions== | ||
+ | |||
+ | * Une version donnée de Vagrant fonctionne avec certaines versions de VirtualBox | ||
+ | |||
== Proxy == | == Proxy == | ||
Ligne 29 : | Ligne 68 : | ||
Les fichiers correspondants sont disponibles dans ~/.vagrant | Les fichiers correspondants sont disponibles dans ~/.vagrant | ||
+ | |||
+ | ; Exemple : | ||
+ | |||
+ | file -i boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/* | ||
+ | boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/box.ovf: text/xml; charset=us-ascii | ||
+ | boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/box_update_check: inode/x-empty; charset=binary | ||
+ | boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/metadata.json: application/json; charset=us-ascii | ||
+ | boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/ubuntu-xenial-16.04-cloudimg-configdrive.vmdk: application/octet-stream; charset=binary | ||
+ | boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/ubuntu-xenial-16.04-cloudimg.mf: text/plain; charset=us-ascii | ||
+ | boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/ubuntu-xenial-16.04-cloudimg.vmdk: application/octet-stream; charset=binary | ||
+ | boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/Vagrantfile: text/plain; charset=us-ascii | ||
+ | |||
+ | = Mediawiki = | ||
+ | |||
+ | https://www.mediawiki.org/wiki/MediaWiki-Vagrant | ||
+ | |||
+ | mkdir Wiki-vagrant | ||
+ | cd Wiki-vagrant/ | ||
+ | git clone --recursive https://gerrit.wikimedia.org/r/mediawiki/vagrant | ||
+ | cd vagrant/ | ||
+ | vagrant up | ||
+ | http://localhost:8080 |
Version actuelle en date du 12 juillet 2022 à 15:06
Outil de gestion de machines virtuelles.
sudo apt-get install vagrant
Vagrant est développé en Ruby.
vagrant box list
- There are no installed boxes! Use `vagrant box add` to add some.
Bases
vagrant help
vagrant box list
vagrant init <box> / vagrant up
vagrant ssh
- État global
vagrant status Current machine states: default running (virtualbox) The VM is running. [...]
- Retrait de box
vagrant box remove ubuntu/jammy64 vagrant box remove --all
- Mise à jour d'une box vagrant existante
vagrant box update
~/.vagrant.d/
TOP5
Une sélection maximale de 5 liens pour en savoir plus...
Attention
Versions
- Une version donnée de Vagrant fonctionne avec certaines versions de VirtualBox
Proxy
Les image sont récupérées via des requêtes internet vers les serveurs/fournisseurs. Il faut donc paramétrer un éventuel proxy. Eg :
export https_proxy=http://...:.. export http_proxy=http://...:..
Tests
vagrant box add ubuntu/xenial32
==> box: Loading metadata for box 'ubuntu/xenial32' box: URL: https://atlas.hashicorp.com/ubuntu/xenial32 ==> box: Adding box 'ubuntu/xenial32' (v20171006.0.0) for provider: virtualbox box: Downloading: https://vagrantcloud.com/ubuntu/boxes/xenial32/versions/20171006.0.0/providers/virtualbox.box
Les fichiers correspondants sont disponibles dans ~/.vagrant
- Exemple
file -i boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/* boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/box.ovf: text/xml; charset=us-ascii boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/box_update_check: inode/x-empty; charset=binary boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/metadata.json: application/json; charset=us-ascii boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/ubuntu-xenial-16.04-cloudimg-configdrive.vmdk: application/octet-stream; charset=binary boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/ubuntu-xenial-16.04-cloudimg.mf: text/plain; charset=us-ascii boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/ubuntu-xenial-16.04-cloudimg.vmdk: application/octet-stream; charset=binary boxes/ubuntu-VAGRANTSLASH-xenial64/20211001.0.0/virtualbox/Vagrantfile: text/plain; charset=us-ascii
Mediawiki
https://www.mediawiki.org/wiki/MediaWiki-Vagrant
mkdir Wiki-vagrant cd Wiki-vagrant/ git clone --recursive https://gerrit.wikimedia.org/r/mediawiki/vagrant cd vagrant/ vagrant up http://localhost:8080