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 \ |
Zack Williams | fcec574 | 2020-10-01 18:56:40 -0700 | [diff] [blame] | 207 | cloud-init \ |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 208 | curl \ |
Andy Bavier | b781c4c | 2018-09-20 08:16:52 -0700 | [diff] [blame] | 209 | ebtables \ |
Zack Williams | fd1d626 | 2019-12-18 16:42:30 -0700 | [diff] [blame] | 210 | enchant \ |
Andy Bavier | b781c4c | 2018-09-20 08:16:52 -0700 | [diff] [blame] | 211 | ethtool \ |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 212 | git \ |
Zack Williams | c9abcdc | 2019-05-09 21:23:38 -0700 | [diff] [blame] | 213 | golang-1.12-go \ |
Zack Williams | 7b3da53 | 2019-12-18 10:41:29 -0700 | [diff] [blame] | 214 | graphviz \ |
Andy Bavier | b781c4c | 2018-09-20 08:16:52 -0700 | [diff] [blame] | 215 | jq \ |
Kailash | 3be4df0 | 2019-02-05 12:43:00 -0800 | [diff] [blame] | 216 | kafkacat \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 217 | "kubeadm=1.18*" \ |
| 218 | "kubelet=1.18*" \ |
| 219 | "kubectl=1.18*" \ |
| 220 | "kubernetes-cni=0.8.7*" \ |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 221 | less \ |
Zack Williams | 9d661a4 | 2018-10-01 15:43:21 -0700 | [diff] [blame] | 222 | libmysqlclient-dev \ |
Zack Williams | 68f4310 | 2018-07-07 12:57:13 -0700 | [diff] [blame] | 223 | libpcap-dev \ |
Zack Williams | cfe0b94 | 2018-04-12 11:47:57 -0700 | [diff] [blame] | 224 | libxml2-utils \ |
Kailash Khalasi | 1ddc7c6 | 2018-04-20 08:47:56 -0700 | [diff] [blame] | 225 | maven \ |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 226 | nodejs \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 227 | python \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 228 | python-dev \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 229 | python-pip \ |
Zack Williams | 4b54baf | 2019-03-08 18:04:37 -0700 | [diff] [blame] | 230 | python3-dev \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 231 | python3-pip \ |
Zack Williams | 40c06f0 | 2018-04-15 20:31:34 -0700 | [diff] [blame] | 232 | ruby \ |
Andy Bavier | bd79f0d | 2019-09-20 13:45:47 -0700 | [diff] [blame] | 233 | screen \ |
Zack Williams | eb842ae | 2018-05-15 17:07:32 -0700 | [diff] [blame] | 234 | socat \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 235 | ssh \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 236 | sshpass \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 237 | zip |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 238 | # end of apt-get install list |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 239 | |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 240 | # remove apt installed incompatible python tools |
Zack Williams | 0716145 | 2020-02-11 11:04:56 -0700 | [diff] [blame] | 241 | # NOTE: Python3 versions are not removed, as cloud-init depends on them |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 242 | apt-get -y remove \ |
| 243 | python-enum34 \ |
| 244 | python-cryptography \ |
| 245 | python-openssl \ |
| 246 | python-ndg-httpsclient \ |
| 247 | python-requests \ |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 248 | python-six \ |
Zack Williams | fcec574 | 2020-10-01 18:56:40 -0700 | [diff] [blame] | 249 | python-urllib3 |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 250 | |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 251 | # install python3 modules |
Zack Williams | 2d28bf8 | 2020-02-10 17:13:25 -0700 | [diff] [blame] | 252 | # upgrade pip or other installations may fail in unusual ways |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 253 | pip3 install --upgrade pip |
| 254 | pip3 install \ |
Zack Williams | 0716145 | 2020-02-11 11:04:56 -0700 | [diff] [blame] | 255 | ansible \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 256 | ansible-lint \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 257 | docker \ |
| 258 | docker-compose \ |
| 259 | git-review \ |
| 260 | httpie \ |
| 261 | netaddr \ |
| 262 | pylint \ |
| 263 | tox \ |
| 264 | twine \ |
| 265 | virtualenv \ |
| 266 | yamllint |
| 267 | # end of pip3 install list |
| 268 | |
| 269 | # install python2 modules |
| 270 | # upgrade pip or other installations may fail in unusual ways |
| 271 | python -m pip install --upgrade pip |
| 272 | python -m pip install \ |
| 273 | Jinja2 \ |
Zack Williams | 958bc4e | 2018-10-18 21:08:25 -0700 | [diff] [blame] | 274 | coverage \ |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 275 | certifi \ |
| 276 | cryptography \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 277 | git+https://github.com/linkchecker/linkchecker.git@v9.4.0 \ |
Luca Prete | 90bfa5e | 2018-03-06 20:41:56 -0800 | [diff] [blame] | 278 | graphviz \ |
Kailash Khalasi | e15b27a | 2018-06-26 13:28:20 -0700 | [diff] [blame] | 279 | grpcio-tools \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 280 | isort \ |
Zack Williams | 941e036 | 2019-09-23 16:29:50 -0700 | [diff] [blame] | 281 | more-itertools==5.0.0 \ |
Andy Bavier | eca7b1d | 2020-09-16 14:50:19 -0700 | [diff] [blame] | 282 | mock==2.0.* \ |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 283 | ndg-httpsclient \ |
Andy Bavier | eca7b1d | 2020-09-16 14:50:19 -0700 | [diff] [blame] | 284 | nose2==0.9.* \ |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 285 | pyopenssl \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 286 | pexpect \ |
Andy Bavier | eca7b1d | 2020-09-16 14:50:19 -0700 | [diff] [blame] | 287 | pyyaml==3.10.* \ |
| 288 | requests==2.14.* \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 289 | robotframework \ |
Kailash Khalasi | cb327c6 | 2018-04-03 10:41:38 -0700 | [diff] [blame] | 290 | robotframework-httplibrary \ |
Kailash Khalasi | a191768 | 2018-08-20 10:34:39 -0700 | [diff] [blame] | 291 | robotframework-kafkalibrary \ |
Kailash | 3035a27 | 2019-07-25 09:31:11 -0700 | [diff] [blame] | 292 | robotframework-lint \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 293 | robotframework-requests \ |
Zack Williams | fd8a004 | 2018-04-12 14:34:17 -0700 | [diff] [blame] | 294 | robotframework-sshlibrary \ |
Zack Williams | 32e17c1 | 2020-02-11 09:38:44 -0700 | [diff] [blame] | 295 | six \ |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 296 | urllib3 |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 297 | # end of pip install list |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 298 | |
Zack Williams | 40c06f0 | 2018-04-15 20:31:34 -0700 | [diff] [blame] | 299 | # install ruby gems |
| 300 | gem install \ |
Ciprian Barbu | f2ddc1a | 2019-11-15 17:54:35 +0200 | [diff] [blame] | 301 | mdl -v 0.5.0 |
Zack Williams | 40c06f0 | 2018-04-15 20:31:34 -0700 | [diff] [blame] | 302 | # end of gem install list |
| 303 | |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 304 | # install npm modules |
| 305 | npm install -g \ |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 306 | gitbook-cli \ |
| 307 | markdownlint \ |
Luca Prete | 31860c5 | 2018-03-06 17:54:38 -0800 | [diff] [blame] | 308 | typings |
| 309 | |
Zack Williams | 6ecb83c | 2018-08-29 13:22:21 -0700 | [diff] [blame] | 310 | # install golang packages in /usr/local/go |
| 311 | # Set PATH=$PATH:/usr/local/go/bin` to use these |
| 312 | export GOPATH=/usr/local/go |
| 313 | mkdir -p $GOPATH |
Zack Williams | c9abcdc | 2019-05-09 21:23:38 -0700 | [diff] [blame] | 314 | export PATH=$PATH:/usr/lib/go-1.12/bin:$GOPATH/bin |
Zack Williams | 42200aa | 2019-04-12 13:27:44 -0700 | [diff] [blame] | 315 | |
Andy Bavier | 126e95b | 2020-09-15 13:10:47 -0700 | [diff] [blame] | 316 | # converters for unit/coverage tests |
Zack Williams | 6ecb83c | 2018-08-29 13:22:21 -0700 | [diff] [blame] | 317 | go get -v github.com/t-yuki/gocover-cobertura |
| 318 | go get -v github.com/jstemmer/go-junit-report |
| 319 | |
Zack Williams | 0ba8a9b | 2020-04-30 22:25:52 -0700 | [diff] [blame] | 320 | # github-release - uploader for github artifacts |
| 321 | go get -v github.com/github-release/github-release |
Zack Williams | 27cd3e5 | 2018-09-18 16:44:50 -0700 | [diff] [blame] | 322 | |
Zack Williams | a2bea0a | 2019-05-09 21:50:37 -0700 | [diff] [blame] | 323 | # 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] | 324 | # https://golang.github.io/dep/docs/installation.html#install-from-source |
| 325 | go get -d -u github.com/golang/dep |
| 326 | pushd $(go env GOPATH)/src/github.com/golang/dep |
Zack Williams | a2bea0a | 2019-05-09 21:50:37 -0700 | [diff] [blame] | 327 | git checkout "0.5.2" |
| 328 | go install -ldflags="-X main.version=0.5.2" ./cmd/dep |
Zack Williams | 142ba6b | 2018-11-20 15:23:39 -0700 | [diff] [blame] | 329 | popd |
| 330 | |
Zack Williams | a6bc772 | 2019-07-08 11:08:41 -0700 | [diff] [blame] | 331 | # golangci-lint for testing |
| 332 | # https://github.com/golangci/golangci-lint#local-installation |
| 333 | GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.17.1 |
| 334 | |
Zack Williams | 42200aa | 2019-04-12 13:27:44 -0700 | [diff] [blame] | 335 | # protoc-gen-go - Golang protbuf compiler extension for protoc (installed |
| 336 | # below) |
| 337 | go get -d -u github.com/golang/protobuf/protoc-gen-go |
| 338 | pushd $(go env GOPATH)/src/github.com/golang/protobuf |
| 339 | git checkout "v1.3.1" |
| 340 | go install ./protoc-gen-go |
| 341 | popd |
| 342 | |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 343 | # install repo launcher v2.9 |
| 344 | REPO_B64_SHA256SUM="da4a14be94382f7ecdb22fef4f554eb0ffcf09a0d8c352667beae4a1794ad666" |
| 345 | 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] | 346 | echo "$REPO_B64_SHA256SUM /tmp/repo.b64" | sha256sum -c - |
| 347 | base64 --decode /tmp/repo.b64 > /tmp/repo |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 348 | mv /tmp/repo /usr/local/bin/repo |
| 349 | chmod a+x /usr/local/bin/repo |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 350 | |
Zack Williams | 4cfdf20 | 2018-05-07 09:58:12 -0700 | [diff] [blame] | 351 | # install helm |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 352 | HELM_VERSION="2.16.10" |
| 353 | HELM_SHA256SUM="65a4857611a4e65b255ec192cbdb34d47212f041260f81a1039c05a8bb9ea041" |
Zack Williams | 8aa5282 | 2018-04-05 09:22:15 -0700 | [diff] [blame] | 354 | HELM_PLATFORM="linux-amd64" |
Zack Williams | 4cfdf20 | 2018-05-07 09:58:12 -0700 | [diff] [blame] | 355 | 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] | 356 | echo "$HELM_SHA256SUM /tmp/helm.tgz" | sha256sum -c - |
| 357 | pushd /tmp |
| 358 | tar -xzvf helm.tgz |
| 359 | mv ${HELM_PLATFORM}/helm /usr/local/bin/helm |
| 360 | chmod a+x /usr/local/bin/helm |
Zack Williams | 4cfdf20 | 2018-05-07 09:58:12 -0700 | [diff] [blame] | 361 | rm -rf helm.tgz ${HELM_PLATFORM} |
| 362 | popd |
| 363 | |
| 364 | # install minikube |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 365 | MINIKUBE_VERSION="1.13.1" |
| 366 | MINIKUBE_SHA256SUM="ac6cd65568f1fdab13207aaed3903037b07bd660a7d0eb4331a2a4198890de39" |
Zack Williams | bdf41e0 | 2020-10-01 09:54:51 -0700 | [diff] [blame] | 367 | 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] | 368 | echo "$MINIKUBE_SHA256SUM /tmp/minikube.deb" | sha256sum -c - |
| 369 | pushd /tmp |
| 370 | dpkg -i minikube.deb |
| 371 | rm -f minikube.deb |
Zack Williams | 8aa5282 | 2018-04-05 09:22:15 -0700 | [diff] [blame] | 372 | popd |
| 373 | |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 374 | # install protobufs |
Zack Williams | df5a4ab | 2019-03-22 14:10:34 -0700 | [diff] [blame] | 375 | PROTOC_VERSION="3.7.0" |
| 376 | PROTOC_SHA256SUM="a1b8ed22d6dc53c5b8680a6f1760a305b33ef471bece482e92728f00ba2a2969" |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 377 | 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 |
| 378 | 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] | 379 | unzip /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /tmp/protoc3 |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 380 | mv /tmp/protoc3/bin/* /usr/local/bin/ |
| 381 | mv /tmp/protoc3/include/* /usr/local/include/ |
Zack Williams | 0f80d90 | 2019-04-01 11:26:57 -0700 | [diff] [blame] | 382 | # fix permissions on files |
| 383 | chmod -R a+rx /usr/local/bin/* |
Zack Williams | 6b06aa5 | 2019-04-01 14:30:17 -0700 | [diff] [blame] | 384 | chmod -R a+rX /usr/local/include/ |
Zack Williams | cab43ba | 2018-09-19 09:58:25 -0700 | [diff] [blame] | 385 | |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 386 | # give sudo permissions on minikube and protoc to jenkins user |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 387 | cat << EOF > /etc/sudoers.d/88-jenkins-minikube-protoc |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 388 | Cmnd_Alias CMDS = /usr/local/bin/protoc, /usr/bin/minikube |
Zack Williams | 8173977 | 2018-05-14 16:35:47 -0700 | [diff] [blame] | 389 | Defaults:jenkins !requiretty |
Kailash Khalasi | 929d21b | 2018-06-28 12:28:17 -0700 | [diff] [blame] | 390 | jenkins ALL=(ALL) NOPASSWD:SETENV: CMDS |
Zack Williams | 8173977 | 2018-05-14 16:35:47 -0700 | [diff] [blame] | 391 | EOF |
| 392 | |
Zack Williams | 9881aea | 2019-07-16 14:14:08 -0700 | [diff] [blame] | 393 | # install hadolint (Dockerfile checker) |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 394 | HADOLINT_VERSION="1.18.0" |
| 395 | HADOLINT_SHA256SUM="f9bc9de12438b463ca84e77fde70b07b155d4da07ca21bc3f4354a62c6199db4" |
Zack Williams | 9881aea | 2019-07-16 14:14:08 -0700 | [diff] [blame] | 396 | curl -L -o /tmp/hadolint https://github.com/hadolint/hadolint/releases/download/v${HADOLINT_VERSION}/hadolint-Linux-x86_64 |
| 397 | echo "$HADOLINT_SHA256SUM /tmp/hadolint" | sha256sum -c - |
| 398 | mv /tmp/hadolint /usr/local/bin/hadolint |
| 399 | chmod -R a+rx /usr/local/bin/hadolint |
| 400 | |
Zack Williams | 7b3da53 | 2019-12-18 10:41:29 -0700 | [diff] [blame] | 401 | # install pandoc (document converter) |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 402 | PANDOC_VERSION="2.10.1" |
| 403 | PANDOC_SHA256SUM="4515d6fe2bf8b82765d8dfa1e1b63ccb0ff3332d60389f948672eaa37932e936" |
Zack Williams | 7b3da53 | 2019-12-18 10:41:29 -0700 | [diff] [blame] | 404 | curl -L -o /tmp/pandoc.deb "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb" |
| 405 | echo "$PANDOC_SHA256SUM /tmp/pandoc.deb" | sha256sum -c - |
| 406 | dpkg -i /tmp/pandoc.deb |
| 407 | rm -f /tmp/pandoc.deb |
| 408 | |
Zack Williams | 960c662 | 2020-04-30 10:11:51 -0700 | [diff] [blame] | 409 | # install yq (YAML query) |
Zack Williams | 3fa1050 | 2020-09-29 22:03:02 -0700 | [diff] [blame] | 410 | YQ_VERSION="3.4.0" |
| 411 | YQ_SHA256SUM="f6bd1536a743ab170b35c94ed4c7c4479763356bd543af5d391122f4af852460" |
Zack Williams | 960c662 | 2020-04-30 10:11:51 -0700 | [diff] [blame] | 412 | curl -L -o /tmp/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 |
| 413 | echo "$YQ_SHA256SUM /tmp/yq" | sha256sum -c - |
| 414 | mv /tmp/yq /usr/local/bin/yq |
| 415 | chmod -R a+rx /usr/local/bin/yq |
| 416 | |
Hung-Wei Chiu | a64209e | 2020-12-15 07:51:33 +0800 | [diff] [blame] | 417 | # add docker cache |
| 418 | cat << EOF > /etc/docker/daemon.json |
| 419 | { |
| 420 | "registry-mirrors":["https://mirror.registry.opennetworking.org"] |
| 421 | } |
| 422 | EOF |
| 423 | service docker restart |
| 424 | |
Andy Bavier | b781c4c | 2018-09-20 08:16:52 -0700 | [diff] [blame] | 425 | # remove apparmor |
| 426 | service apparmor stop |
| 427 | update-rc.d -f apparmor remove |
| 428 | apt-get remove apparmor-utils libapparmor-perl apparmor |
| 429 | update-grub |
| 430 | |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 431 | # clean up |
| 432 | apt-get clean |
| 433 | apt-get purge -y |
| 434 | apt-get autoremove -y |
| 435 | rm -rf /var/lib/apt/lists/* |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 436 | } |
Zack Williams | 85249ce | 2018-04-01 19:54:44 -0700 | [diff] [blame] | 437 | |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 438 | all_systems() { |
| 439 | echo 'No common distribution configuration to perform' |
| 440 | } |
| 441 | |
| 442 | echo "---> Detecting OS" |
| 443 | ORIGIN=$(facter operatingsystem | tr '[:upper:]' '[:lower:]') |
| 444 | |
| 445 | case "${ORIGIN}" in |
| 446 | fedora|centos|redhat) |
| 447 | echo "---> RH type system detected" |
| 448 | rh_systems |
| 449 | ;; |
| 450 | ubuntu) |
| 451 | echo "---> Ubuntu system detected" |
| 452 | ubuntu_systems |
| 453 | ;; |
| 454 | *) |
| 455 | echo "---> Unknown operating system" |
| 456 | ;; |
| 457 | esac |
| 458 | |
| 459 | # execute steps for all systems |
| 460 | all_systems |