11# Multipass
22
3- Here we describe how to setup an VM with local Mylyn Test Instances
3+ Here we describe how to set up a VM with local Mylyn test instances.
44
5- This setup use Ansible and inside the VM we use Docker Swarm
5+ This setup uses Ansible, and within the VM we use Docker or Docker Swarm.
66
7- Actual we only support the setup in Docker Swarm with 3 VM's but in the
8- future I will continue to support a setup with only 1 VM
7+ The Docker Swarm mode with 3 VMs is no longer used (but not removed); instead, we now work in container mode.
98
10- This setup is only tested on am MacBook Pro M1.
9+ In this mode, we have 2 VMs
10+ 1 . Management VM for admin, createCertificates
11+ 2 . Work VM Docker host with all services
12+ After setup, you can stop the management VM.
1113
14+
15+ This setup has only been tested on a MacBook Pro M1 and a MacMini M4.
16+
17+ Here are the following steps.
12181 . Download Multipass
1319 please install https://multipass.run/install for your platform
14202 . Add certificate so you can run a runtime Workspace
@@ -17,81 +23,65 @@ This setup is only tested on am MacBook Pro M1.
1723 $JAVA_HOME was not set on my environment so I have to use th Path '/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home' instead
1824
1925 1 . cp /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/lib/security/cacerts to the root folder of your installation ../certs/cacerts
20- 3 . Create the Multipass VM's (3 VM's)
26+ 3 . Create the Multipass VM's
2127 - switch to this folder
2228 ```
2329 cd ./org.eclipse.mylyn.all/org.eclipse.mylyn/org.eclipse.mylyn.releng/multipass/
2430 ```
25- - create the 3 VM's
31+ - create the VM's
32+ ```
33+ ansible-playbook -i inventory.yml create_vm.yml --ask-become-pass --extra-vars="local_prefix=mylyn"
2634 ```
27- ansible-playbook create_vm.yml --ask-become-pass --extra-vars="docker_run_mode=container"
28- or
29- ansible-playbook create_vm.yml --ask-become-pass --extra-vars="docker_run_mode=swarm"
30- or
31- ansible-playbook create_vm.yml --ask-become-pass --extra-vars="docker_run_mode=single"
35+ this is the same as
3236 ```
33- This creates the 3 VM's and make sure that /etc/hosts contains the correct entries
34- and also update the inventory.yml with the new IP addresses of the VM's.
35- During the first time run we create a sshkey for all instances in folder first_setup
37+ ansible-playbook -i inventory.yml create_vm.yml --ask-become-pass --extra-vars="local_prefix=mylyn" --extra-vars="docker_run_mode=container
38+ ```
39+ This does the following steps
40+ 1. creates the VM's
41+ 2. sure that /etc/hosts contains the correct entries
42+ 3. create the rootca and certificate
43+ 4. During the first time run we create a sshkey for all instances in folder first_setup
44+ This creates the VM's and make sure that /etc/hosts contains the correct entries and also update the inventory.yml with the new IP addresses of the VM's.
45+ During the first time run we create a sshkey for all instances in folder first_setup
46+
47+
36484. First time Setup the VM's
3749 ```
38- ansible-playbook mylyn_setup.yml --extra-vars="docker_run_mode=container"
39- or
40- ansible-playbook mylyn_setup.yml --extra-vars="docker_run_mode=swarm"
41- or
42- ansible-playbook mylyn_setup.yml --extra-vars="docker_run_mode=single"
50+ ansible-playbook -i inventory.yml mylyn_setup.yml --extra-vars="local_prefix=mylyn"
4351 ```
44525. restart the services the VM's
4553 ```
46- ansible-playbook mylyn_setup.yml --skip-tags base_software --extra-vars="docker_run_mode=container"
47- or
48- ansible-playbook mylyn_setup.yml --skip-tags base_software --extra-vars="docker_run_mode=swarm"
49- or
50- ansible-playbook mylyn_setup.yml --skip-tags base_software --extra-vars="docker_run_mode=single"
51- ```
52- or with recreate the Docker swarm
53- ```
54- ansible-playbook mylyn_setup.yml --skip-tags base_software --extra-vars="swarm_recreate=true" --extra-vars="docker_run_mode=swarm"
54+ ansible-playbook mylyn_setup.yml -i inventory.yml --skip-tags base_software --extra-vars="local_prefix=mylyn"
5555 ```
5656
57576. delete VM's and recreate VM's
5858 1. delete the running VM's
5959 ```
60- multipass delete mylynadm01
61- multipass delete mylynmstr01
62- multipass delete mylynwrk01
60+ multipass delete < nmae VM1 >
61+ multipass delete < nmae VM2 >
62+ multipass delete < nmae VM3 >
6363 multipass purge
6464 ```
6565 2. on macOS we need to delete the on no longer needed IP Address
6666 ```
6767 sudo vi /var/db/dhcpd_leases (delete the 7 lines per instance)
6868 vi ~/.ssh/known_hosts (remove the old ip adress entries)
6969 ```
70- 3 . recreate the VM's and start the Services with
71- ```
72- ansible-playbook create_vm.yml --ask-become-pass --extra-vars="docker_run_mode=container"
73- ansible-playbook mylyn_setup.yml --extra-vars="docker_run_mode=container"
74- because container is Default you can also use
75- ansible-playbook create_vm.yml --ask-become-pass
76- ansible-playbook mylyn_setup.yml
77- or
78- ansible-playbook create_vm.yml --ask-become-pass --extra-vars="docker_run_mode=swarm"
79- ansible-playbook mylyn_setup.yml --extra-vars="docker_run_mode=swarm"
80- or
81- ansible-playbook create_vm.yml --ask-become-pass --extra-vars="docker_run_mode=single"
82- ansible-playbook mylyn_setup.yml --extra-vars="docker_run_mode=single"
83- ```
70+
71+ Now you can use the following URLs
72+ - https://mylyn.local/traefikdashboard
73+ - https://mylyn.local/mylyn_idx/
74+ - https://mylyn.local/grafana/
8475
85- Now you can use the URLs https://traefik.mylyn.local and https://mylyn.local/mylyn_idx/ for verification on the installation host computer.
76+ for verification on the installation host computer.
8677You will get certification warnings and must trust the self signed certificate.
8778
8879If you want to access the URLs from an other computer in your local environment you must add a line to your /etc/hosts file.
89- Look into /etc/hosts of your installation host computer and you see the following line
90- ```
91- 192.168.64.3 mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local artifactory.mylyn.local gitlab.mylyn.local
92- ```
93- copy this line and replace the IP adress with the local network IP address assinged to the mylynmstr01 vm
94- ```
95- 192.168.2.120 mylynmstr01 mylyn.local traefik.mylyn.local jenkins.mylyn.local artifactory.mylyn.local gitlab.mylyn.local
96- ```
97- Now you shold be able to assess the URLs from the other computer
80+
81+ You can add the following additional variables for the Ansible playbook. Use the extra-vars when executing create_vm.yml. For mylyn_setup.yml, use only local_prefix; all others will be loaded from create_vm.yml.
82+
83+ | varname | Decription |
84+ | --- | --- |
85+ | local_prefix | There are groups in the inventory, and you can select which groups to use.<br >This is used to support an inventory that can be used for different VM setups.<br >The default setting is “mylyn,” assuming we have the following groups: mylyn_admin, mylyn_swarm_master, mylyn_swarm_worker. |
86+ | local_domain | The name of the domain. The default setting is “mylyn.local.” |
87+ | docker_run_mode | Setting mode. Allowed values: swarm, container, single.<br >The default setting is “container”, and the other modes may result in configuration errors. |
0 commit comments