-
install choco > run in elevated powershell
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
-
install prereqs > in same elevated powershell
choco install vagrant vim git virtualbox
-
REBOOT
NOTE *ENSURE VT is enabled in bios*
-
create folder for vagrant machines > in your user powershell
#folder where vm files will be stored/shared mkdir devops cd devops
-
create vagrant definition for vm > in your user powershell
notepad Vagrantfile
Vagrant.configure("2") do |config| config.vm.box = "ubuntu/jammy64" config.vm.network "forwarded_port", guest: 80, host:80 end
This is extremely simplified for illustration purposes.
-
Run > in your user powershell
vagrant up
Note If you have ERROR starting vagrant, update to Vagrant to 2.3.6 or above or use the ERROR FIX of replacing the broken ruby file
C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-2.3.5\lib\vagrant\util\file_mutex.rb
with file_mutex.rb -
Ready for use
-
SSH to the vm > in your powershell
vagrant ssh
-
Run provisioning script > on the vm
#installs system updates and sets up swap needed for mysql sudo /vagrant/install/provision.sh
-
REBOOT > on the vm
sudo reboot
-
SSH back into to the vm > in your powershell
vagrant ssh
-
Run provisioning script, yes again > on the vm
#sets up apache and mysql (Note: ssl will be added below) sudo /vagrant/install/provision.sh
-
Install composer > on the vm
#puts in ~/bin/composer.phar sudo /vagrant/install//install-composer.sh
-
Install Symfony > on the vm
#create the apache webfolder and certs sudo /vagrant/install/create_ssssl.sh symfony.ubuntu.lan #install symfony demo /vagrant/install/install-symfony.sh
-
Install Drupal > on the vm
#create the apache webfolder and certs sudo /vagrant/install/create_ssssl.sh drupal.ubuntu.lan #install drupal /vagrant/install/install-drupal.sh
-
Log out of SSH > on the vm
exit
-
Update local computer root certificates > in your powershell
local-certificates.ps1 add
- Ready for use > in your powershell
- start firefoox https://ubuntu.lan
- start chrome https://symfony.ubuntu.lan
- start explorer https://drupal.ubuntu.lan
- On the Ubuntu VM:
sudo /vagrant/install/create_ssssl.sh something.ubuntu.lan
- On the User local machine
local-certificates.ps1 add
to import ssl - Add content on the Ubuntu VM:
/var/www/something.ubuntu.lan/
Note See the
install-symfony.sh
script for more details