Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Ubuntu base build |
| 3 | |
| 4 | # vim: ts=4 sw=4 sts=4 et tw=72 : |
| 5 | |
| 6 | # force any errors to cause the script and job to end in failure |
| 7 | set -xeu -o pipefail |
| 8 | |
| 9 | rh_systems() { |
| 10 | echo 'No changes to apply' |
| 11 | } |
| 12 | |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 13 | ubuntu_systems() { |
Matteo Scandolo | bb71099 | 2019-03-06 14:50:47 -0800 | [diff] [blame] | 14 | DISTRO=$(lsb_release -cs) |
| 15 | |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 16 | # get prereqs for PPA and apt-over-HTTPS support |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 17 | apt-get clean |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 18 | apt-get update |
| 19 | apt-get install -y apt-transport-https software-properties-common |
| 20 | |
Zack Williams | daf691d | 2020-02-10 10:55:59 -0700 | [diff] [blame] | 21 | # set up git backports repo |
| 22 | add-apt-repository -y ppa:git-core/ppa |
| 23 | |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 24 | # set up docker repo |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 25 | cat << EOF | base64 -d > /tmp/docker-apt-key.gpg |
| 26 | LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkZpdDJpb0JFQU |
| 27 | RoV3BaOC93dlo2aFVUaVhPd1FIWE1BbGFGSGNQSDloQXRyNEYxeTIrT1lkYnRNdXRoCmxx |
| 28 | cXdwMDI4QXF5WStQUmZWTXRTWU1ianVRdXU1Ynl5S1IwMUJicVlodVMzanRxUW1salovYk |
| 29 | p2WHF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ZVDkwcUZGOTNNM3YwMUJieFArRUlZMi85dGlJUGJyZAo9MFlZ |
| 98 | aAotLS0tLUVORCBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCg== |
| 99 | EOF |
| 100 | |
| 101 | apt-key add /tmp/docker-apt-key.gpg |
| 102 | add-apt-repository -y \ |
| 103 | "deb [arch=amd64] https://download.docker.com/linux/ubuntu $DISTRO stable" |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 104 | |
Zack Williams | 6ecb83c | 2018-08-29 13:22:21 -0700 | [diff] [blame] | 105 | # set up golang repo |
Zack Williams | c9abcdc | 2019-05-09 21:23:38 -0700 | [diff] [blame] | 106 | # docs: https://github.com/golang/go/wiki/Ubuntu |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 107 | add-apt-repository -y ppa:longsleep/golang-backports |
Zack Williams | 6ecb83c | 2018-08-29 13:22:21 -0700 | [diff] [blame] | 108 | |
Zack Williams | 7722ef2 | 2018-10-16 14:08:29 -0700 | [diff] [blame] | 109 | # set up kubernetes repo |
| 110 | cat << EOF | base64 -d > /tmp/k8s-apt-key.gpg |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 111 | xsBNBFrBaNsBCADrF18KCbsZlo4NjAvVecTBCnp6WcBQJ5oSh7+E98jX9YznUCrNrgmeCc |
| 112 | CMUvTDRDxfTaDJybaHugfba43nqhkbNpJ47YXsIa+YL6eEE9emSmQtjrSWIiY+2YJYwsDg |
| 113 | sgckF3duqkb02OdBQlh6IbHPoXB6H//b1PgZYsomB+841XW1LSJPYlYbIrWfwDfQvtkFQI |
| 114 | 90r6NknVTQlpqQh5GLNWNYqRNrGQPmsB+NrUYrkl1nUt1LRGu+rCe4bSaSmNbwKMQKkROE |
| 115 | 4kTiB72DPk7zH4Lm0uo0YFFWG4qsMIuqEihJ/9KNX8GYBr+tWgyLooLlsdK3l+4dVqd8cj |
| 116 | kJM1ExABEBAAHNQEdvb2dsZSBDbG91ZCBQYWNrYWdlcyBBdXRvbWF0aWMgU2lnbmluZyBL |
| 117 | ZXkgPGdjLXRlYW1AZ29vZ2xlLmNvbT7CwHgEEwECACwFAlrBaNsJEGoDCyG6B/T7AhsPBQ |
| 118 | kFo5qABgsJCAcDAgYVCAIJCgsEFgIDAQAAJr4IAM5lgJ2CTkTRu2iw+tFwb90viLR6W0N1 |
| 119 | CiSPUwi1gjEKMr5r0aimBi6FXiHTuX7RIldSNynkypkZrNAmTMM8SU+sri7R68CFTpSgAv |
| 120 | W8qlnlv2iwrEApd/UxxzjYaq8ANcpWAOpDsHeDGYLCEmXOhu8LmmpY4QqBuOCM40kuTDRd |
| 121 | 52PCJE6b0V1t5zUqdKeKZCPQPhsS/9rdYP9yEEGdsx0V/Vt3C8hjv4Uwgl8Fa3s/4ag6lg |
| 122 | If+4SlkBAdfl/MTuXu/aOhAWQih444igB+rvFaDYIhYosVhCxP4EUAfGZk+qfo2mCY3w1p |
| 123 | te31My+vVNceEZSUpMetSfwit3QA8EE= |
Zack Williams | 7722ef2 | 2018-10-16 14:08:29 -0700 | [diff] [blame] | 124 | EOF |
| 125 | |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 126 | apt-key add /tmp/k8s-apt-key.gpg |
| 127 | add-apt-repository -y "deb http://apt.kubernetes.io/ kubernetes-xenial main" |
Zack Williams | 7722ef2 | 2018-10-16 14:08:29 -0700 | [diff] [blame] | 128 | |
Matteo Scandolo | bb71099 | 2019-03-06 14:50:47 -0800 | [diff] [blame] | 129 | # set up NodeJS repo |
Zack Williams | 6a1d454 | 2019-03-09 09:04:26 -0700 | [diff] [blame] | 130 | # Instructions: https://github.com/nodesource/distributions/blob/master/README.md#manual-installation |
Matteo Scandolo | bb71099 | 2019-03-06 14:50:47 -0800 | [diff] [blame] | 131 | cat << EOF | base64 -d > /tmp/nodejs-apt-key.gpg |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 132 | LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEdudVBHIH |
| 133 | YxCkNvbW1lbnQ6IEdQR1Rvb2xzIC0gaHR0cHM6Ly9ncGd0b29scy5vcmcKCm1RSU5CRk9i |
| 134 | SkxZQkVBRGtGVzhITWpzb1lSSlE0bkNZQy82RWgweUxXSFdmQ2grLzlaU0lqNHcvcE9lMl |
| 135 | Y2VisKVzZESFkza0szYSsyYnhyYXg5RXFLZTd1eGtTS2Y5NWdmbnMrSTkrUitSSmZScGIx |
| 136 | cXZsalVScjU0eTM1SVpncwpmTUcyMk5wK1RtTTJSTGdkRkNaYTE4aDArUmJIOWkwYitack |
| 137 | I5WFBabUxiL2g5b3U3U293R3FRM3d3T3RUM1Z5CnFtaWYwQTJHQ2NqRlRxV1c2VFhhWThl |
| 138 | Wko5QkNFcVczay8wQ2p3N0svbVN5L3V0eFlpVUl2Wk5LZ2FHL1A4VTcKODlReXZ4ZVJ4QW |
| 139 | Y5M1lGQVZ6TVhob0t4dTEySXVINFZuU3dBZmI4Z1F5eEtSeWlHT1V3azBZb0JQcHFSbk1t |
| 140 | RApEbDdTZG1ZM29RSEVKekJlbFRNalRNOEFqYkI5bVdvUEJYNUc4dDR1NDcvRlo2UGdkZm |
| 141 | 1SZzloc0tYaGtMSmM3CkMxYnRibE9ITmdEeDE5ZnpBU1dYK3hPalppS3BQNk1rRUV6cTFi |
| 142 | aWxVRnVsNlJEdHhrVFdzVGE1VEdpeGdDQi8KRzJmSzhJOUpML3lRaERjNk9HWTltalBPeE |
| 143 | 1iNVBnVWxUOG94M3Y4d3QyNWVyV2o5ejMwUW9FQndmU2c0dHpMYwpKcTZOL2llcFFlbU5m |
| 144 | bzZJcytURytKekk2dmhYamxzQm0vWG16MFppRlBQT2JBSC92R0NZNUk2ODg2dlhRN2Z0Cn |
| 145 | FXSFlIVDhqei9SNHRpZ01HQyt0dlova2NtWUJzTENDS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NktPY05LWjhyVkZkd0ZwamJ2d0hNUUJXaH |
| 187 | JxZnUKRzNLYWVQdmJuT2JLSFhwZklLb0FNN1gycWZPK0lGbkxHVFB5aEZUY3JsNnZaQlRN |
| 188 | WlRmWmlDMVhEUUx1R1VuZApzY2t1WElOSVUzREZXelpHcjBRcnFrdUUvanlyN0ZYZVVKaj |
| 189 | lCN2NMbytzL1RYbytSYVZmaTNrT2M5Qm94SXZ5Ci9xaU5Hcy9US3kyL1VqcXAvYWZmbUlN |
| 190 | b01YU296S21nYTgxSlN3a0FETzFKTWdVeTZkQXBYejlrUDRFRTNnPT0KPUNMR0YKLS0tLS |
| 191 | 1FTkQgUEdQIFBVQkxJQyBLRVkgQkxPQ0stLS0tLQo= |
Matteo Scandolo | bb71099 | 2019-03-06 14:50:47 -0800 | [diff] [blame] | 192 | EOF |
| 193 | |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 194 | apt-key add /tmp/nodejs-apt-key.gpg |
Matteo Scandolo | bb71099 | 2019-03-06 14:50:47 -0800 | [diff] [blame] | 195 | NODE_VERSION=node_7.x |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 196 | add-apt-repository -y "deb [arch=amd64] https://deb.nodesource.com/$NODE_VERSION $DISTRO main" |
Matteo Scandolo | bb71099 | 2019-03-06 14:50:47 -0800 | [diff] [blame] | 197 | |
Zack Williams | 7722ef2 | 2018-10-16 14:08:29 -0700 | [diff] [blame] | 198 | # update after adding apt repos to sources |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 199 | apt-get update |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 200 | |
| 201 | # install basic sofware requirements |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 202 | apt-get install -y \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 203 | "docker-ce=5:19.03*" \ |
Andy Bavier | b781c4c | 2018-09-20 08:16:52 -0700 | [diff] [blame] | 204 | apt-transport-https \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 205 | build-essential \ |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 206 | bzip2 \ |
| 207 | curl \ |
Andy Bavier | b781c4c | 2018-09-20 08:16:52 -0700 | [diff] [blame] | 208 | ebtables \ |
Zack Williams | fd1d626 | 2019-12-18 16:42:30 -0700 | [diff] [blame] | 209 | enchant \ |
Andy Bavier | b781c4c | 2018-09-20 08:16:52 -0700 | [diff] [blame] | 210 | ethtool \ |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 211 | git \ |
Zack Williams | c9abcdc | 2019-05-09 21:23:38 -0700 | [diff] [blame] | 212 | golang-1.12-go \ |
Zack Williams | 7b3da53 | 2019-12-18 10:41:29 -0700 | [diff] [blame] | 213 | graphviz \ |
Andy Bavier | b781c4c | 2018-09-20 08:16:52 -0700 | [diff] [blame] | 214 | jq \ |
Kailash | 3be4df0 | 2019-02-05 12:43:00 -0800 | [diff] [blame] | 215 | kafkacat \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 216 | "kubeadm=1.18*" \ |
| 217 | "kubelet=1.18*" \ |
| 218 | "kubectl=1.18*" \ |
| 219 | "kubernetes-cni=0.8.7*" \ |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 220 | less \ |
Zack Williams | 9d661a4 | 2018-10-01 15:43:21 -0700 | [diff] [blame] | 221 | libmysqlclient-dev \ |
Zack Williams | 68f4310 | 2018-07-07 12:57:13 -0700 | [diff] [blame] | 222 | libpcap-dev \ |
Zack Williams | cfe0b94 | 2018-04-12 11:47:57 -0700 | [diff] [blame] | 223 | libxml2-utils \ |
Kailash Khalasi | 1ddc7c6 | 2018-04-20 08:47:56 -0700 | [diff] [blame] | 224 | maven \ |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 225 | nodejs \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 226 | python \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 227 | python-dev \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 228 | python-pip \ |
Zack Williams | 4b54baf | 2019-03-08 18:04:37 -0700 | [diff] [blame] | 229 | python3-dev \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 230 | python3-pip \ |
Zack Williams | 40c06f0 | 2018-04-15 20:31:34 -0700 | [diff] [blame] | 231 | ruby \ |
Andy Bavier | bd79f0d | 2019-09-20 13:45:47 -0700 | [diff] [blame] | 232 | screen \ |
Zack Williams | eb842ae | 2018-05-15 17:07:32 -0700 | [diff] [blame] | 233 | socat \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 234 | ssh \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 235 | sshpass \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 236 | zip |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 237 | # end of apt-get install list |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 238 | |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 239 | # remove apt installed incompatible python tools |
Zack Williams | 0716145 | 2020-02-11 11:04:56 -0700 | [diff] [blame] | 240 | # NOTE: Python3 versions are not removed, as cloud-init depends on them |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 241 | apt-get -y remove \ |
| 242 | python-enum34 \ |
| 243 | python-cryptography \ |
| 244 | python-openssl \ |
| 245 | python-ndg-httpsclient \ |
| 246 | python-requests \ |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 247 | python-six \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 248 | python-urllib3 \ |
| 249 | python3-chardet \ |
| 250 | python3-requests \ |
| 251 | python3-six \ |
| 252 | python3-urllib3 |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 253 | |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 254 | # install python3 modules |
Zack Williams | 2d28bf8 | 2020-02-10 17:13:25 -0700 | [diff] [blame] | 255 | # upgrade pip or other installations may fail in unusual ways |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 256 | pip3 install --upgrade pip |
| 257 | pip3 install \ |
Zack Williams | 0716145 | 2020-02-11 11:04:56 -0700 | [diff] [blame] | 258 | ansible \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 259 | ansible-lint \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 260 | docker \ |
| 261 | docker-compose \ |
| 262 | git-review \ |
| 263 | httpie \ |
| 264 | netaddr \ |
| 265 | pylint \ |
| 266 | tox \ |
| 267 | twine \ |
| 268 | virtualenv \ |
| 269 | yamllint |
| 270 | # end of pip3 install list |
| 271 | |
| 272 | # install python2 modules |
| 273 | # upgrade pip or other installations may fail in unusual ways |
| 274 | python -m pip install --upgrade pip |
| 275 | python -m pip install \ |
| 276 | Jinja2 \ |
Zack Williams | 958bc4e | 2018-10-18 21:08:25 -0700 | [diff] [blame] | 277 | coverage \ |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 278 | certifi \ |
| 279 | cryptography \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 280 | git+https://github.com/linkchecker/linkchecker.git@v9.4.0 \ |
Luca Prete | 90bfa5e | 2018-03-06 20:41:56 -0800 | [diff] [blame] | 281 | graphviz \ |
Kailash Khalasi | e15b27a | 2018-06-26 13:28:20 -0700 | [diff] [blame] | 282 | grpcio-tools \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 283 | isort \ |
Zack Williams | 941e036 | 2019-09-23 16:29:50 -0700 | [diff] [blame] | 284 | more-itertools==5.0.0 \ |
Andy Bavier | eca7b1d | 2020-09-16 14:50:19 -0700 | [diff] [blame] | 285 | mock==2.0.* \ |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 286 | ndg-httpsclient \ |
Andy Bavier | eca7b1d | 2020-09-16 14:50:19 -0700 | [diff] [blame] | 287 | nose2==0.9.* \ |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 288 | pyopenssl \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 289 | pexpect \ |
Andy Bavier | eca7b1d | 2020-09-16 14:50:19 -0700 | [diff] [blame] | 290 | pyyaml==3.10.* \ |
| 291 | requests==2.14.* \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 292 | robotframework \ |
Kailash Khalasi | cb327c6 | 2018-04-03 10:41:38 -0700 | [diff] [blame] | 293 | robotframework-httplibrary \ |
Kailash Khalasi | a191768 | 2018-08-20 10:34:39 -0700 | [diff] [blame] | 294 | robotframework-kafkalibrary \ |
Kailash | 3035a27 | 2019-07-25 09:31:11 -0700 | [diff] [blame] | 295 | robotframework-lint \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 296 | robotframework-requests \ |
Zack Williams | fd8a004 | 2018-04-12 14:34:17 -0700 | [diff] [blame] | 297 | robotframework-sshlibrary \ |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 298 | six \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 299 | urllib3 |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 300 | # end of pip install list |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 301 | |
Zack Williams | 40c06f0 | 2018-04-15 20:31:34 -0700 | [diff] [blame] | 302 | # install ruby gems |
| 303 | gem install \ |
Ciprian Barbu | f2ddc1a | 2019-11-15 17:54:35 +0200 | [diff] [blame] | 304 | mdl -v 0.5.0 |
Zack Williams | 40c06f0 | 2018-04-15 20:31:34 -0700 | [diff] [blame] | 305 | # end of gem install list |
| 306 | |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 307 | # install npm modules |
| 308 | npm install -g \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 309 | gitbook-cli \ |
| 310 | markdownlint \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 311 | typings |
| 312 | |
Zack Williams | 6ecb83c | 2018-08-29 13:22:21 -0700 | [diff] [blame] | 313 | # install golang packages in /usr/local/go |
| 314 | # Set PATH=$PATH:/usr/local/go/bin` to use these |
| 315 | export GOPATH=/usr/local/go |
| 316 | mkdir -p $GOPATH |
Zack Williams | c9abcdc | 2019-05-09 21:23:38 -0700 | [diff] [blame] | 317 | export PATH=$PATH:/usr/lib/go-1.12/bin:$GOPATH/bin |
Zack Williams | 42200aa | 2019-04-12 13:27:44 -0700 | [diff] [blame] | 318 | |
Andy Bavier | 126e95b | 2020-09-15 13:10:47 -0700 | [diff] [blame] | 319 | # converters for unit/coverage tests |
Zack Williams | 6ecb83c | 2018-08-29 13:22:21 -0700 | [diff] [blame] | 320 | go get -v github.com/t-yuki/gocover-cobertura |
| 321 | go get -v github.com/jstemmer/go-junit-report |
| 322 | |
Zack Williams | 0ba8a9b | 2020-04-30 22:25:52 -0700 | [diff] [blame] | 323 | # github-release - uploader for github artifacts |
| 324 | go get -v github.com/github-release/github-release |
Zack Williams | 27cd3e5 | 2018-09-18 16:44:50 -0700 | [diff] [blame] | 325 | |
Zack Williams | a2bea0a | 2019-05-09 21:50:37 -0700 | [diff] [blame] | 326 | # dep for go package dependencies w/versioning, version 0.5.2, adapted from: |
Zack Williams | 142ba6b | 2018-11-20 15:23:39 -0700 | [diff] [blame] | 327 | # https://golang.github.io/dep/docs/installation.html#install-from-source |
| 328 | go get -d -u github.com/golang/dep |
| 329 | pushd $(go env GOPATH)/src/github.com/golang/dep |
Zack Williams | a2bea0a | 2019-05-09 21:50:37 -0700 | [diff] [blame] | 330 | git checkout "0.5.2" |
| 331 | go install -ldflags="-X main.version=0.5.2" ./cmd/dep |
Zack Williams | 142ba6b | 2018-11-20 15:23:39 -0700 | [diff] [blame] | 332 | popd |
| 333 | |
Zack Williams | a6bc772 | 2019-07-08 11:08:41 -0700 | [diff] [blame] | 334 | # golangci-lint for testing |
| 335 | # https://github.com/golangci/golangci-lint#local-installation |
| 336 | GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.17.1 |
| 337 | |
Zack Williams | 42200aa | 2019-04-12 13:27:44 -0700 | [diff] [blame] | 338 | # protoc-gen-go - Golang protbuf compiler extension for protoc (installed |
| 339 | # below) |
| 340 | go get -d -u github.com/golang/protobuf/protoc-gen-go |
| 341 | pushd $(go env GOPATH)/src/github.com/golang/protobuf |
| 342 | git checkout "v1.3.1" |
| 343 | go install ./protoc-gen-go |
| 344 | popd |
| 345 | |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 346 | # install repo launcher v2.9 |
| 347 | REPO_B64_SHA256SUM="da4a14be94382f7ecdb22fef4f554eb0ffcf09a0d8c352667beae4a1794ad666" |
| 348 | curl -o /tmp/repo.b64 'https://gerrit.googlesource.com/git-repo/+/refs/tags/v2.9/repo?format=TEXT' |
Zack Williams | d30d752 | 2019-12-16 09:10:48 -0700 | [diff] [blame] | 349 | echo "$REPO_B64_SHA256SUM /tmp/repo.b64" | sha256sum -c - |
| 350 | base64 --decode /tmp/repo.b64 > /tmp/repo |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 351 | mv /tmp/repo /usr/local/bin/repo |
| 352 | chmod a+x /usr/local/bin/repo |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 353 | |
Zack Williams | 4cfdf20 | 2018-05-07 09:58:12 -0700 | [diff] [blame] | 354 | # install helm |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 355 | HELM_VERSION="2.16.10" |
| 356 | HELM_SHA256SUM="65a4857611a4e65b255ec192cbdb34d47212f041260f81a1039c05a8bb9ea041" |
Zack Williams | 8aa5282 | 2018-04-05 09:22:15 -0700 | [diff] [blame] | 357 | HELM_PLATFORM="linux-amd64" |
Zack Williams | 4cfdf20 | 2018-05-07 09:58:12 -0700 | [diff] [blame] | 358 | curl -L -o /tmp/helm.tgz "https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-${HELM_PLATFORM}.tar.gz" |
Zack Williams | 8aa5282 | 2018-04-05 09:22:15 -0700 | [diff] [blame] | 359 | echo "$HELM_SHA256SUM /tmp/helm.tgz" | sha256sum -c - |
| 360 | pushd /tmp |
| 361 | tar -xzvf helm.tgz |
| 362 | mv ${HELM_PLATFORM}/helm /usr/local/bin/helm |
| 363 | chmod a+x /usr/local/bin/helm |
Zack Williams | 4cfdf20 | 2018-05-07 09:58:12 -0700 | [diff] [blame] | 364 | rm -rf helm.tgz ${HELM_PLATFORM} |
| 365 | popd |
| 366 | |
| 367 | # install minikube |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 368 | MINIKUBE_VERSION="1.13.1" |
| 369 | MINIKUBE_SHA256SUM="ac6cd65568f1fdab13207aaed3903037b07bd660a7d0eb4331a2a4198890de39" |
Zack Williams | bdf41e0 | 2020-10-01 09:54:51 -0700 | [diff] [blame^] | 370 | curl -L -o /tmp/minikube.deb "https://github.com/kubernetes/minikube/releases/download/v${MINIKUBE_VERSION}/minikube_${MINIKUBE_VERSION}-0_amd64.deb" |
Zack Williams | 4cfdf20 | 2018-05-07 09:58:12 -0700 | [diff] [blame] | 371 | echo "$MINIKUBE_SHA256SUM /tmp/minikube.deb" | sha256sum -c - |
| 372 | pushd /tmp |
| 373 | dpkg -i minikube.deb |
| 374 | rm -f minikube.deb |
Zack Williams | 8aa5282 | 2018-04-05 09:22:15 -0700 | [diff] [blame] | 375 | popd |
| 376 | |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 377 | # install protobufs |
Zack Williams | df5a4ab | 2019-03-22 14:10:34 -0700 | [diff] [blame] | 378 | PROTOC_VERSION="3.7.0" |
| 379 | PROTOC_SHA256SUM="a1b8ed22d6dc53c5b8680a6f1760a305b33ef471bece482e92728f00ba2a2969" |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 380 | curl -L -o /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip |
| 381 | echo "$PROTOC_SHA256SUM /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip" | sha256sum -c - |
Kailash Khalasi | c4ff32d | 2018-06-28 18:24:52 -0700 | [diff] [blame] | 382 | unzip /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /tmp/protoc3 |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 383 | mv /tmp/protoc3/bin/* /usr/local/bin/ |
| 384 | mv /tmp/protoc3/include/* /usr/local/include/ |
Zack Williams | 0f80d90 | 2019-04-01 11:26:57 -0700 | [diff] [blame] | 385 | # fix permissions on files |
| 386 | chmod -R a+rx /usr/local/bin/* |
Zack Williams | 6b06aa5 | 2019-04-01 14:30:17 -0700 | [diff] [blame] | 387 | chmod -R a+rX /usr/local/include/ |
Zack Williams | cab43ba | 2018-09-19 09:58:25 -0700 | [diff] [blame] | 388 | |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 389 | # give sudo permissions on minikube and protoc to jenkins user |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 390 | cat << EOF > /etc/sudoers.d/88-jenkins-minikube-protoc |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 391 | Cmnd_Alias CMDS = /usr/local/bin/protoc, /usr/bin/minikube |
Zack Williams | 8173977 | 2018-05-14 16:35:47 -0700 | [diff] [blame] | 392 | Defaults:jenkins !requiretty |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 393 | jenkins ALL=(ALL) NOPASSWD:SETENV: CMDS |
Zack Williams | 8173977 | 2018-05-14 16:35:47 -0700 | [diff] [blame] | 394 | EOF |
| 395 | |
Zack Williams | 9881aea | 2019-07-16 14:14:08 -0700 | [diff] [blame] | 396 | # install hadolint (Dockerfile checker) |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 397 | HADOLINT_VERSION="1.18.0" |
| 398 | HADOLINT_SHA256SUM="f9bc9de12438b463ca84e77fde70b07b155d4da07ca21bc3f4354a62c6199db4" |
Zack Williams | 9881aea | 2019-07-16 14:14:08 -0700 | [diff] [blame] | 399 | curl -L -o /tmp/hadolint https://github.com/hadolint/hadolint/releases/download/v${HADOLINT_VERSION}/hadolint-Linux-x86_64 |
| 400 | echo "$HADOLINT_SHA256SUM /tmp/hadolint" | sha256sum -c - |
| 401 | mv /tmp/hadolint /usr/local/bin/hadolint |
| 402 | chmod -R a+rx /usr/local/bin/hadolint |
| 403 | |
Zack Williams | 7b3da53 | 2019-12-18 10:41:29 -0700 | [diff] [blame] | 404 | # install pandoc (document converter) |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 405 | PANDOC_VERSION="2.10.1" |
| 406 | PANDOC_SHA256SUM="4515d6fe2bf8b82765d8dfa1e1b63ccb0ff3332d60389f948672eaa37932e936" |
Zack Williams | 7b3da53 | 2019-12-18 10:41:29 -0700 | [diff] [blame] | 407 | curl -L -o /tmp/pandoc.deb "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb" |
| 408 | echo "$PANDOC_SHA256SUM /tmp/pandoc.deb" | sha256sum -c - |
| 409 | dpkg -i /tmp/pandoc.deb |
| 410 | rm -f /tmp/pandoc.deb |
| 411 | |
Zack Williams | 960c662 | 2020-04-30 10:11:51 -0700 | [diff] [blame] | 412 | # install yq (YAML query) |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 413 | YQ_VERSION="3.4.0" |
| 414 | YQ_SHA256SUM="f6bd1536a743ab170b35c94ed4c7c4479763356bd543af5d391122f4af852460" |
Zack Williams | 960c662 | 2020-04-30 10:11:51 -0700 | [diff] [blame] | 415 | curl -L -o /tmp/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 |
| 416 | echo "$YQ_SHA256SUM /tmp/yq" | sha256sum -c - |
| 417 | mv /tmp/yq /usr/local/bin/yq |
| 418 | chmod -R a+rx /usr/local/bin/yq |
| 419 | |
Andy Bavier | b781c4c | 2018-09-20 08:16:52 -0700 | [diff] [blame] | 420 | # remove apparmor |
| 421 | service apparmor stop |
| 422 | update-rc.d -f apparmor remove |
| 423 | apt-get remove apparmor-utils libapparmor-perl apparmor |
| 424 | update-grub |
| 425 | |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 426 | # clean up |
| 427 | apt-get clean |
| 428 | apt-get purge -y |
| 429 | apt-get autoremove -y |
| 430 | rm -rf /var/lib/apt/lists/* |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 431 | } |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 432 | |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 433 | all_systems() { |
| 434 | echo 'No common distribution configuration to perform' |
| 435 | } |
| 436 | |
| 437 | echo "---> Detecting OS" |
| 438 | ORIGIN=$(facter operatingsystem | tr '[:upper:]' '[:lower:]') |
| 439 | |
| 440 | case "${ORIGIN}" in |
| 441 | fedora|centos|redhat) |
| 442 | echo "---> RH type system detected" |
| 443 | rh_systems |
| 444 | ;; |
| 445 | ubuntu) |
| 446 | echo "---> Ubuntu system detected" |
| 447 | ubuntu_systems |
| 448 | ;; |
| 449 | *) |
| 450 | echo "---> Unknown operating system" |
| 451 | ;; |
| 452 | esac |
| 453 | |
| 454 | # execute steps for all systems |
| 455 | all_systems |