Outils pour utilisateurs

Outils du site


devweb:vagrant (lu 25379 fois)

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
devweb:vagrant [28-07-2016 15:29]
edmc73 créée
devweb:vagrant [19-09-2016 21:46] (Version actuelle)
edmc73
Ligne 4: Ligne 4:
  
 ===== Installation ===== ===== Installation =====
-Installer virtualbox (4 car j'ai eu des problèmes avec la 5)+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://atlas.hashicorp.com/tjo/boxes/debian-jessie64-lamp-stack J'ai trouvé celle ci => https://atlas.hashicorp.com/tjo/boxes/debian-jessie64-lamp-stack
 +
  
 On crée un répertoire de travail On crée un répertoire de travail
Ligne 26: Ligne 27:
 $ vagrant init tjo/debian-jessie64-lamp-stack; vagrant up --provider virtualbox $ vagrant init tjo/debian-jessie64-lamp-stack; vagrant up --provider virtualbox
  
-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 'default' up with 'virtualbox' provider... Bringing machine 'default' up with 'virtualbox' provider...
-==> default: Box 'tjo/debian-jessie64-lamp-stack' could not be found. Attempting to find and install... 
-    default: Box Provider: virtualbox 
-    default: Box Version: >= 0 
-==> default: Loading metadata for box 'tjo/debian-jessie64-lamp-stack' 
-    default: URL: https://atlas.hashicorp.com/tjo/debian-jessie64-lamp-stack 
-==> default: Adding box 'tjo/debian-jessie64-lamp-stack' (v0.0.1) for provider: virtualbox 
-    default: Downloading: https://atlas.hashicorp.com/tjo/boxes/debian-jessie64-lamp-stack/versions/0.0.1/providers/virtualbox.box 
-==> default: Successfully added box 'tjo/debian-jessie64-lamp-stack' (v0.0.1) for 'virtualbox'! 
 ==> default: Importing base box 'tjo/debian-jessie64-lamp-stack'... ==> default: Importing base box 'tjo/debian-jessie64-lamp-stack'...
 ==> default: Matching MAC address for NAT networking... ==> default: Matching MAC address for NAT networking...
 ==> default: Checking if box 'tjo/debian-jessie64-lamp-stack' is up to date... ==> default: Checking if box 'tjo/debian-jessie64-lamp-stack' is up to date...
-==> 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:2222
 +    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 => /home/user/dev/mon_projet
  
 </code> </code>
 +
 +Nous voici avec une VM de debian jessie avec de apache, mysql et php d'installé.
 +
 +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
 +
 +<code>
 +  # Create a private network, which allows host-only access to the machine
 +  # using a specific IP.
 +  config.vm.network "private_network", ip: "192.168.33.10"
 +</code>
 +
 +===== Scotch Box =====
 +
 +Scotch Box fourni une box vagrant toute prête sans besoin de puppet ou cook chef
 +  * https://box.scotch.io/
 +
 +
devweb/vagrant.1469712552.txt.gz · Dernière modification: 28-07-2016 15:29 de edmc73