-
Notifications
You must be signed in to change notification settings - Fork 1
/
user-data-xenial.yaml
179 lines (174 loc) · 8.65 KB
/
user-data-xenial.yaml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
#cloud-config
#create files
write_files:
- path: /etc/motd # ASCII art displayed when someone logs in on terminal
content: |1
This is the SDI4Apps platform
____ ____ ___ _ _ _
/ ___|| _ \_ _| || | / \ _ __ _ __ ___
\___ \| | | | || || |_ / _ \ | _ \| _ \/ __|
___) | |_| | ||__ _/ ___ \| |_) | |_) \__ \
|____/|____/___| |_|/_/ \_\ __/| __/|___/
|_| |_|
SDI4Apps platform installation is in progress now. Please wait.
It takes some time. You can watch the progress
by issuing the following command:
tail -f /var/log/cloud-init-output.log
and wait for the following line to appear: "The SDI4Apps platform installation was completed"
- path: /etc/apt/apt.conf.d/50unattended-upgrades
content: |1
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
"${distro_id}:${distro_codename}-updates";
};
Unattended-Upgrade::Mail "root";
Unattended-Upgrade::MailOnlyOnError "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "02:00";
#add software repositories
apt_sources:
- source: "ppa:webupd8team/java" # Oracle Java PPA (add-apt-repository ppa:webupd8team/java)
- source: "ppa:ubuntugis/ubuntugis-unstable" # UbuntuGIS PPA
- source: 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' # PostgreSQL latest repository
filename: pgdg.list
key: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBE6XR8IBEACVdDKT2HEH1IyHzXkb4nIWAY7echjRxo7MTcj4vbXAyBKOfjja
UrBEJWHN6fjKJXOYWXHLIYg0hOGeW9qcSiaa1/rYIbOzjfGfhE4x0Y+NJHS1db0V
G6GUj3qXaeyqIJGS2z7m0Thy4Lgr/LpZlZ78Nf1fliSzBlMo1sV7PpP/7zUO+aA4
bKa8Rio3weMXQOZgclzgeSdqtwKnyKTQdXY5MkH1QXyFIk1nTfWwyqpJjHlgtwMi
c2cxjqG5nnV9rIYlTTjYG6RBglq0SmzF/raBnF4Lwjxq4qRqvRllBXdFu5+2pMfC
IZ10HPRdqDCTN60DUix+BTzBUT30NzaLhZbOMT5RvQtvTVgWpeIn20i2NrPWNCUh
hj490dKDLpK/v+A5/i8zPvN4c6MkDHi1FZfaoz3863dylUBR3Ip26oM0hHXf4/2U
A/oA4pCl2W0hc4aNtozjKHkVjRx5Q8/hVYu+39csFWxo6YSB/KgIEw+0W8DiTII3
RQj/OlD68ZDmGLyQPiJvaEtY9fDrcSpI0Esm0i4sjkNbuuh0Cvwwwqo5EF1zfkVj
Tqz2REYQGMJGc5LUbIpk5sMHo1HWV038TWxlDRwtOdzw08zQA6BeWe9FOokRPeR2
AqhyaJJwOZJodKZ76S+LDwFkTLzEKnYPCzkoRwLrEdNt1M7wQBThnC5z6wARAQAB
tBxQb3N0Z3JlU1FMIERlYmlhbiBSZXBvc2l0b3J5iQI9BBMBCAAnAhsDBQsJCAcD
BRUKCQgLBRYCAwEAAh4BAheABQJS6RUZBQkOhCctAAoJEH/MfUaszEz4zmQP/2ad
HtuaXL5Xu3C3NGLha/aQb9iSJC8z5vN55HMCpsWlmslCBuEr+qR+oZvPkvwh0Io/
8hQ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YaLlOB+eTORg/F1EWLPm34kKSRtae3gfHuY2cdUmoDVnOF8C9hc0P
bL65G4NWPt+fW7lIj+0+kF19s2PviQI9BBMBCAAnAhsDBQsJCAcDBRUKCQgLBRYC
AwEAAh4BAheABQJRKm2VBQkINsBBAAoJEH/MfUaszEz4RTEP/1sQHyjHaUiAPaCA
v8jw/3SaWP/g8qLjpY6ROjLnDMvwKwRAoxUwcIv4/TWDOMpwJN+CJIbjXsXNYvf9
OX+UTOvq4iwi4ADrAAw2xw+Jomc6EsYla+hkN2FzGzhpXfZFfUsuphjY3FKL+4hX
H+R8ucNwIz3yrkfc17MMn8yFNWFzm4omU9/JeeaafwUoLxlULL2zY7H3+QmxCl0u
6t8VvlszdEFhemLHzVYRY0Ro/ISrR78CnANNsMIy3i11U5uvdeWVCoWV1BXNLzOD
4+BIDbMB/Do8PQCWiliSGZi8lvmj/sKbumMFQonMQWOfQswTtqTyQ3yhUM1LaxK5
PYq13rggi3rA8oq8SYb/KNCQL5pzACji4TRVK0kNpvtxJxe84X8+9IB1vhBvF/Ji
/xDd/3VDNPY+k1a47cON0S8Qc8DA3mq4hRfcgvuWy7ZxoMY7AfSJOhleb9+PzRBB
n9agYgMxZg1RUWZazQ5KuoJqbxpwOYVFja/stItNS4xsmi0lh2I4MNlBEDqnFLUx
SvTDc22c3uJlWhzBM/f2jH19uUeqm4jaggob3iJvJmK+Q7Ns3WcfhuWwCnc1+58d
iFAMRUCRBPeFS0qd56QGk1r97B6+3UfLUslCfaaA8IMOFvQSHJwDO87xWGyxeRTY
IIP9up4xwgje9LB7fMxsSkCDTHOk
=s3DI
-----END PGP PUBLIC KEY BLOCK-----
#update packages to latest versions
apt_update: True
#apt_upgrade: True
# Agreement with Oracle licence before packages are installed
# setting up Postfix SMTP server for outgoing email
bootcmd:
- 'echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections'
- 'echo postfix postfix/main_mailer_type select Internet Site | /usr/bin/debconf-set-selections'
- 'echo postfix postfix/mailname string $(hostname -f) | /usr/bin/debconf-set-selections'
#install these packages
packages:
- ant
- cgi-mapserver
- fail2ban
- gdal-bin
- htop
- libapache2-mod-php7.0
- libapache2-mod-python
- mailutils
- nodejs
- npm
- ntp
- oracle-java7-installer
- oracle-java7-unlimited-jce-policy
- oracle-java7-set-default
- php7.0
- php7.0-curl
- php7.0-mysql
- php7.0-mbstring
- php7.0-pgsql
- php7.0-sqlite
- php7.0-xsl
- phppgadmin
- postgis
- postfix
- postgresql-9.6-pgrouting
- python-cssutils
- python-gdal
- python-html5lib
- python-httplib2
- python-lxml
- python-mapscript
- python-owslib
- python-psycopg2
- python-pycurl
- python-pyproj
- python-requests
- python-webpy
- subversion
- sqlite3
# - virtuoso-opensource
# - unixodbc
# - mono-reference-assemblies-2.0
#create some users
users:
#creates default user named "ubuntu" (as specified in /etc/cloud/cloud.cfg)
- default
#add another user
- name: makub
gecos: Martin Kuba
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtv24kBxvFCiDAUxQvsYEaIoWdU+QVgcWU1q4uJ8Ngy+LKn6XIVQTKlWd9W7MPUgpL5jPHVgExN1vpH+UlS0cducDUCRVB3JU4fW8jXge/JEhqhfrwKMD/iE0DJ0k2Zxd8pyIway1Q2KYs5tqQTJcQX3FsJ2V86pDFeLYmisRTFbo4n0wog20euPYCuTAY0KlA8mkOb/WXUcLICgT3O6Tvp9Vyez1P1eHT1DW7dkeu5hqal08raXNGwF9+xvo2oHzstTSHl/juXS+gmiI1Y4VqRiR0C6Euy/MBX4ywyOi/Fm8r9qxcvYaULsy/k8KudNjipL5KQxd/xKpw2Azs7fbbw== [email protected]
#aad the following ssh keys to the first specified user
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtv24kBxvFCiDAUxQvsYEaIoWdU+QVgcWU1q4uJ8Ngy+LKn6XIVQTKlWd9W7MPUgpL5jPHVgExN1vpH+UlS0cducDUCRVB3JU4fW8jXge/JEhqhfrwKMD/iE0DJ0k2Zxd8pyIway1Q2KYs5tqQTJcQX3FsJ2V86pDFeLYmisRTFbo4n0wog20euPYCuTAY0KlA8mkOb/WXUcLICgT3O6Tvp9Vyez1P1eHT1DW7dkeu5hqal08raXNGwF9+xvo2oHzstTSHl/juXS+gmiI1Y4VqRiR0C6Euy/MBX4ywyOi/Fm8r9qxcvYaULsy/k8KudNjipL5KQxd/xKpw2Azs7fbbw== [email protected]
# run script that installs SDI4Apps software
runcmd:
- 'wget --quiet https://raw.githubusercontent.com/SDI4Apps/cloud-platform/master/install_sdi4apps_xenial.sh -O /tmp/install_sdi4apps.sh'
- 'bash /tmp/install_sdi4apps.sh'
#final message
final_message: "The SDI4Apps platform installation was completed after $UPTIME seconds"