summaryrefslogtreecommitdiff
path: root/integration/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key
blob: cb2e851b6f23042bcbced0c39abfdeea1479b743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

# CONTEXT: GUEST during PRE-CONSTRUCTION as ROOT
# PURPOSE: Setup apt-repo list so that we can connect to Percona's repo

set -e
set -o xtrace

GUEST_USERNAME=${GUEST_USERNAME:-"ubuntu"}
RELEASE=${DIB_RELEASE:-"xenial"}

# Add Percona GPG key
mkdir -p /home/${GUEST_USERNAME}/.gnupg

get_key_robust 1C4CBDCDCD2EFD2A
get_key_robust 9334A25F8507EFA5

# Add Percona repo
# Creates the percona sources list
cat <<EOL > /etc/apt/sources.list.d/percona.list
deb http://repo.percona.com/apt $RELEASE main
deb-src http://repo.percona.com/apt $RELEASE main
EOL

# Force an update
apt-get update