Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| devweb:vagrant [28-07-2016 13:29] – créée edmc73 | devweb:vagrant [19-09-2016 19:46] (Version actuelle) – edmc73 | ||
|---|---|---|---|
| Ligne 4: | Ligne 4: | ||
| ===== Installation ===== | ===== Installation ===== | ||
| - | Installer virtualbox | + | Installer virtualbox |
| sudo apt-get install virtualbox virtualbox-dkms virtualbox-qt | sudo apt-get install virtualbox virtualbox-dkms virtualbox-qt | ||
| Ligne 16: | Ligne 16: | ||
| J'ai trouvé celle ci => https:// | J'ai trouvé celle ci => https:// | ||
| + | |||
| On crée un répertoire de travail | On crée un répertoire de travail | ||
| Ligne 26: | Ligne 27: | ||
| $ vagrant init tjo/ | $ vagrant init tjo/ | ||
| - | Vagrant is upgrading some internal state for the latest version. | ||
| - | Please do not quit Vagrant at this time. While upgrading, Vagrant | ||
| - | will need to copy all your boxes, so it will use a considerable | ||
| - | amount of disk space. After it is done upgrading, the temporary disk | ||
| - | space will be freed. | ||
| - | |||
| - | Press ctrl-c now to exit if you want to remove some boxes or free | ||
| - | up some disk space. | ||
| - | |||
| - | Press the Enter or Return key to continue. | ||
| A `Vagrantfile` has been placed in this directory. You are now | A `Vagrantfile` has been placed in this directory. You are now | ||
| ready to `vagrant up` your first virtual environment! Please read | ready to `vagrant up` your first virtual environment! Please read | ||
| the comments in the Vagrantfile as well as documentation on | the comments in the Vagrantfile as well as documentation on | ||
| `vagrantup.com` for more information on using Vagrant. | `vagrantup.com` for more information on using Vagrant. | ||
| - | |||
| Bringing machine ' | Bringing machine ' | ||
| - | ==> default: Box ' | ||
| - | default: Box Provider: virtualbox | ||
| - | default: Box Version: >= 0 | ||
| - | ==> default: Loading metadata for box ' | ||
| - | default: URL: https:// | ||
| - | ==> default: Adding box ' | ||
| - | default: Downloading: | ||
| - | ==> default: Successfully added box ' | ||
| ==> default: Importing base box ' | ==> default: Importing base box ' | ||
| ==> default: Matching MAC address for NAT networking... | ==> default: Matching MAC address for NAT networking... | ||
| ==> default: Checking if box ' | ==> default: Checking if box ' | ||
| - | ==> default: Setting the name of the VM: mon_projet_default_1469711707174_99813 | + | ==> default: Setting the name of the VM: QAint_default_1469718758382_40918 |
| ==> default: Clearing any previously set network interfaces... | ==> default: Clearing any previously set network interfaces... | ||
| ==> default: Preparing network interfaces based on configuration... | ==> default: Preparing network interfaces based on configuration... | ||
| Ligne 61: | Ligne 43: | ||
| ==> default: Booting VM... | ==> default: Booting VM... | ||
| ==> default: Waiting for machine to boot. This may take a few minutes... | ==> default: Waiting for machine to boot. This may take a few minutes... | ||
| + | default: SSH address: 127.0.0.1: | ||
| + | default: SSH username: vagrant | ||
| + | default: SSH auth method: private key | ||
| + | ==> default: Machine booted and ready! | ||
| + | ==> default: Checking for guest additions in VM... | ||
| + | ==> default: Mounting shared folders... | ||
| + | default: /vagrant => / | ||
| </ | </ | ||
| + | |||
| + | Nous voici avec une VM de debian jessie avec de apache, mysql et php d' | ||
| + | |||
| + | Pour se logguer simplement en ssh, tapez la commande | ||
| + | vagrant ssh | ||
| + | |||
| + | Pour arrêter la machine, tapez la commande | ||
| + | vagrant halt | ||
| + | |||
| + | Modifiez le fichier Vagrantfile et configurer une adresse ip pour votre machine | ||
| + | |||
| + | < | ||
| + | # Create a private network, which allows host-only access to the machine | ||
| + | # using a specific IP. | ||
| + | config.vm.network " | ||
| + | </ | ||
| + | |||
| + | ===== Scotch Box ===== | ||
| + | |||
| + | Scotch Box fourni une box vagrant toute prête sans besoin de puppet ou cook chef | ||
| + | * https:// | ||
| + | |||
| + | |||