From 7bfa3da53de5a5ae8f0aa5ca236560fc155cf26d Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Fri, 3 Sep 2021 15:27:29 -0400 Subject: [PATCH] chore: Update vagrant usage doc --- .../environments/ubuntu-focal64/Vagrantfile | 45 ++++++++++++++++--- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/ui/desktop/electron-app/tests/environments/ubuntu-focal64/Vagrantfile b/ui/desktop/electron-app/tests/environments/ubuntu-focal64/Vagrantfile index 4c2c51616..85fd11cb3 100644 --- a/ui/desktop/electron-app/tests/environments/ubuntu-focal64/Vagrantfile +++ b/ui/desktop/electron-app/tests/environments/ubuntu-focal64/Vagrantfile @@ -1,19 +1,45 @@ # -*- mode: ruby -*- # vi: set ft=ruby : -# User --provision-with option to setup machine for either cli or development -# To setup a machine for testing: -# vagrant up --provision-with setup,cli -# To setup a machine for developing desktop client: -# vagrant up --provision-with setup,development -# To destroy machine: -# vagrant destroy -f +=begin +This vagrant script is used to setup Ubuntu in Virtualbox and deploy both the desktop client and cli +in preparation for testing linux support for desktop client. + +## Setup Desktop +For staged or release build: +- Download Desktop Client `*.deb` package from release url to `ubuntu-focal64/staged-release` + ``` +wget -P staged-release http://hc-releases-boundary-desktop-staging.s3-website-us-east-1.amazonaws.com/boundary-desktop/1.3.0/boundary-desktop_1.3.0_linux_amd64.deb +``` +For using locally built debian artifacts: +- Refer to 'Building for Production' section in /boundary-ui/ui/desktop/README to build debian artifacts on MacOS + +## Setup Ubuntu +- Create a ubuntu desktop box using vagrant: `vagrant up --provision-with setup,cli,staged-desktop` +- Desktop client artifact and cli will be available in `/home/vagrant/Desktop` after logging into ubuntu. + Username/password for login: vagrant/vagrant. Navigate to `/home/vagrant/Desktop` in a terminal app. +- To install desktop app use either `apt` or `dpkg` + - `sudo apt install ./boundary-desktop_1.3.0_linux_amd64.deb` + - `sudo dpkg -i ./boundary-desktop_1.3.0_linux_amd64.deb` + - To launch desktop client from terminal: `boundary-desktop` +- To launch cli: `./boundary dev` + +## Provision types +User --provision-with option to setup machine for either cli or development +To setup a machine for testing: + vagrant up --provision-with setup,cli +To setup a machine for developing desktop client: + vagrant up --provision-with setup,development +To destroy machine: + vagrant destroy -f +=end Vagrant.configure("2") do |config| config.vm.box = "ubuntu/focal64" # Share desktop artifacts folder config.vm.synced_folder "../../../out/release", "/vagrant-desktop-app", create: true, owner: "vagrant", group: "vagrant", automount: true + config.vm.synced_folder "./staged-release", "/vagrant-desktop-staged-app", create: true, owner: "vagrant", group: "vagrant", automount: true config.vm.provider "virtualbox" do |vb| # Display the VirtualBox GUI when booting the machine @@ -70,5 +96,10 @@ Vagrant.configure("2") do |config| yarn install SHELL + config.vm.provision "staged-desktop", type: "shell", inline: <<-SHELL + sudo cp -r /media/sf_vagrant-desktop-staged-app/. /home/vagrant/Desktop + chown -R vagrant:vagrant /home/vagrant/Desktop + SHELL + config.vm.post_up_message = "Login using username/password: vagrant/vagrant.\nBoundary Desktop Artifacts: /media/sf_vagrant-boundary-desktop-app.\nBoundary CLI: /home/vagrant/Desktop/boundary." end