You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: ansible/MANUAL_STEPS.md
+114-1
Original file line number
Diff line number
Diff line change
@@ -718,7 +718,120 @@ Note that while this is being done across all Docker hosts, you should disable [
718
718
719
719
## SmartOS
720
720
721
-
Joyent SmartOS machines use `libsmartsshd.so` for PAM SSH authentication in order to look up SSH keys allowed to access machines. Part of our Ansible setup removes this so we can only rely on traditional SSH authentication. Therefore, it is critcal to put `nodejs_test_*` public keys into `$USER/.ssh/authorized_keys` as appropriate or access will be lost and not recoverable after reboot or sshd restart (part of Ansible setup).
721
+
The SmartOS machines are hosted by MNX.io. They are individual machines with the actual jenkins worker housed inside a VM on the host. To provision a new SmartOS jenkins host for testing we must do the following manual steps to prepare:
722
+
1. Provision the host at MNX.io. The credentials for the mnx.io account are located in the admin logins file in the secrets repo.
723
+
2. Configuration of the host environment
724
+
3. Create the VM environment
725
+
4. Configure the VM environment
726
+
5. Create the Jenkins nodes/Open the jenkins firewall
727
+
6. Ansible the VM
728
+
729
+
### Provisioning the Machines
730
+
The host environment that houses the virtual machines currently relies on some older system libraries in order for compilation to succeed on smartos VM's. MNX.io has provided a base platform that has these older libs that we can use to make the workers.
731
+
732
+
1. Login to MNX.io.
733
+
2. Select "Compute" and then "Custom Images" From the left sidebar
734
+
3. Click on "Create Instance" on the `smartos-retro-20220407T001427Z`row.
735
+
4. Then "click on the "Compute" option and pick c1.xlarge-ojsf (16GB Rab, 4vcpus, 200GB Disk), and then "Next"
736
+
5. Name the instance test-mnx-smartosXX-x64-Y where XX is the version of smartos you plan on provisioning, and Y is an incremented number of similar instances
737
+
6. Select MNX-Triton-Public (public) as the Network
738
+
7. Add a tag of "role" = "test"
739
+
8. Click Launch.
740
+
741
+
Instances should launch and be ready relatively quickly (less than 5 minutes)
742
+
743
+
### Configuring the Host Environment
744
+
Once the instance is up you should be able to find its host IP address (choose Instances from the left column).
745
+
Then, ssh to get into the host hypervisor: `ssh root@<IP ADDRESS> -i ~/.ssh/nodejs_build_test` (the nodejs_build_test key should be on the machine)
746
+
The older images are still configured to point at a defunct joyent image archve. We have to point to the new mnx one:
747
+
1.`mkdir /var/imgadm`
748
+
2.`vi /var/imgadm/imgadm.conf`
749
+
3. Put the following json into the contents:
750
+
```
751
+
{
752
+
"dockerImportSkipUuids": true,
753
+
"upgradedToVer": "3.0.0",
754
+
"source": "https://images.mnx.io",
755
+
"sources": [
756
+
{
757
+
"type": "imgapi",
758
+
"url": "https://images.smartos.org"
759
+
}
760
+
]
761
+
}
762
+
```
763
+
4. Find the UUID of the image for the version of smartos you want to run on the VM: `imgadm avail name=base-64-lts`
7. create the vm with `vmadm create -f image_properties.json`
812
+
8. ssh to the internal vm, proxying through the host: ```ssh root@172.16.9.3 -oProxyCommand="ssh root@192.207.255.126 -i ~/.ssh/nodejs_build_test -W %h:%p" -o StrictHostKeyChecking=no -i ~/.ssh/nodejs_build_test``` Note that the 192.207.255.126 is the IP address asssigned to the instance at MNX.(see image)
813
+
9. install `htop` and `python` (use `pkgin search` to find the latest version of python to install based on the smartos version `python311` on smartos22, `python312` on smartos23)
19. add the jenkins secret for the new node to the secrets repo
830
+
20. Provision with ansible: `ansible-playbook ansible/playbooks/jenkins/worker/create.yml --limit "<HOSTNAME_TO_PROVISION>" -vv
831
+
21. Ensure host can connect by modifying iptables on jenkins ci director.
832
+
833
+
834
+
SmartOS machines use `libsmartsshd.so` for PAM SSH authentication in order to look up SSH keys allowed to access machines. Part of our Ansible setup removes this so we can only rely on traditional SSH authentication. Therefore, it is critcal to put `nodejs_test_*` public keys into `$USER/.ssh/authorized_keys` as appropriate or access will be lost and not recoverable after reboot or sshd restart (part of Ansible setup).
0 commit comments