User Tools

Site Tools


технология_vagrant

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
технология_vagrant [2022/07/26 06:46]
val [С использованием внешних скриптов]
технология_vagrant [2022/08/15 09:32]
val [Внутри Vagrantfile]
Line 94: Line 94:
 <​code>​ <​code>​
 λ npp Vagrantfile & λ npp Vagrantfile &
-</​code><​code>​+</​code>​ 
 + 
 +Параметр virtualbox__intnet можно не указывать,​ установлен в false по умолчанию 
 + 
 +<​code>​
 ... ...
 Vagrant.configure("​2"​) do |config| Vagrant.configure("​2"​) do |config|
Line 127: Line 131:
  
 ### /My provision ### ### /My provision ###
 +
 +...
 +  # config.vm.provider "​virtualbox"​ do |vb|
 +  #   ​vb.memory = "​1024"​
 +  #   ​vb.cpus = "​2"​
 +  # end
 ... ...
  
Line 141: Line 151:
 #sed -i '​s/​PasswordAuthentication no/​PasswordAuthentication yes/g' /​etc/​ssh/​sshd_config #sed -i '​s/​PasswordAuthentication no/​PasswordAuthentication yes/g' /​etc/​ssh/​sshd_config
 #echo '​root:​strongpassword'​ | chpasswd #echo '​root:​strongpassword'​ | chpasswd
 +
 +echo '​vagrant:​strongpassword'​ | chpasswd
  
 timedatectl set-timezone Europe/​Moscow timedatectl set-timezone Europe/​Moscow
Line 273: Line 285:
           vb.customize ['​createhd',​ '​--filename',​ file_to_disk,​ '​--size',​ 5 * 1024]           vb.customize ['​createhd',​ '​--filename',​ file_to_disk,​ '​--size',​ 5 * 1024]
         end         end
-        vb.customize ['​storageattach',​ :id, '​--storagectl',​ '​SATA ​Controller', '​--port',​ 2, '​--device',​ 0, '​--type',​ '​hdd',​ '​--medium',​ file_to_disk]+        vb.customize ['​storageattach',​ :id, '​--storagectl',​ '​SATA',​ '​--port',​ 2, '​--device',​ 0, '​--type',​ '​hdd',​ '​--medium',​ file_to_disk]
       end       end
  
Line 348: Line 360:
 #          vb.customize ['​createhd',​ '​--filename',​ file_to_disk,​ '​--size',​ 4 * 1024] #          vb.customize ['​createhd',​ '​--filename',​ file_to_disk,​ '​--size',​ 4 * 1024]
 #        end #        end
-#        vb.customize ['​storageattach',​ :id, '​--storagectl',​ '​SATA ​Controller', '​--port',​ 2, '​--device',​ 0, '​--type',​ '​hdd',​ '​--medium',​ file_to_disk]+#        vb.customize ['​storageattach',​ :id, '​--storagectl',​ '​SATA',​ '​--port',​ 2, '​--device',​ 0, '​--type',​ '​hdd',​ '​--medium',​ file_to_disk]
 #      end #      end
  
технология_vagrant.txt · Last modified: 2024/04/09 16:59 by val