|
| 1 | +## Diable cockpit |
| 2 | +- ``systemctl disable --now cockpit.socket`` |
| 3 | + |
1 | 4 | ## Install packages |
2 | 5 | - gcc |
3 | 6 | - python3-devel |
@@ -38,8 +41,48 @@ Note: connecting may take some time |
38 | 41 | - ``virsh net-start br0`` |
39 | 42 | - ``virsh net-autostart br0`` |
40 | 43 |
|
| 44 | +## Download VmManager |
| 45 | +``` |
| 46 | +#!/usr/bin/env bash |
| 47 | +
|
| 48 | +# Authorize to GitHub to get the latest release tar.gz |
| 49 | +# Requires: oauth token, https://help.github.com/articles/creating-an-access-token-for-command-line-use/ |
| 50 | +# Requires: jq package to parse json |
| 51 | +
|
| 52 | +# Your oauth token goes here, see link above |
| 53 | +OAUTH_TOKEN="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" |
| 54 | +# Repo owner (user id) |
| 55 | +OWNER="macOS-KVM" |
| 56 | +# Repo name |
| 57 | +REPO="VmManager" |
| 58 | +# The file name expected to download. This is deleted before curl pulls down a new one |
| 59 | +FILE_NAME="VmManager-build.zip" |
| 60 | +
|
| 61 | +# Concatenate the values together for a |
| 62 | +API_URL="https://$OAUTH_TOKEN:@api.github.com/repos/$OWNER/$REPO" |
| 63 | +
|
| 64 | +# Gets info on latest release, gets first uploaded asset id of a release, |
| 65 | +# More info on jq being used to parse json: https://stedolan.github.io/jq/tutorial/ |
| 66 | +ASSET_ID=$(curl $API_URL/releases/latest | jq -r '.assets[0].id') |
| 67 | +echo "Asset ID: $ASSET_ID" |
| 68 | +
|
| 69 | +# curl does not allow overwriting file from -O, nuke |
| 70 | +rm -f $FILE_NAME |
| 71 | +
|
| 72 | +# curl: |
| 73 | +# -O: Use name provided from endpoint |
| 74 | +# -J: "Content Disposition" header, in this case "attachment" |
| 75 | +# -L: Follow links, we actually get forwarded in this request |
| 76 | +# -H "Accept: application/octet-stream": Tells api we want to dl the full binary |
| 77 | +curl -O -J -L -H "Accept: application/octet-stream" "$API_URL/releases/assets/$ASSET_ID" |
| 78 | +``` |
| 79 | + |
| 80 | + |
41 | 81 | ## Install python modules |
42 | 82 | - ``pip3 install -r requirements.txt`` |
43 | 83 |
|
44 | | -## Start VmManager |
45 | | -- ``python3 VmManager.py`` |
| 84 | +## Disable firewall |
| 85 | +- ``systemctl disable --now firewalld`` |
| 86 | + |
| 87 | +## Done |
| 88 | +- Follow the instructions in the README.md file to run VmManager |
0 commit comments