<commit_before>#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 approximately 10 minutes. 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
#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.5-pgrouting
  - python-cssutils 
  - python-gdal 
  - python-html5lib 
  - python-httplib2 
  - python-lxml 
  - python-psycopg2 
  - python-pycurl 
  - python-pyproj 
  - 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: <NAME><commit_msg>upgraded PostgreSQL to 9.6 and PostGIS to 2.3<commit_after>#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 approximately 10 minutes. 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+NJHS<KEY>
      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
      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-psycopg2 
  - python-pycurl 
  - python-pyproj 
  - 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: <NAME>
{'fraction_non_alphanumeric': 0.09605087014725569, 'fraction_numerical': 0.04785809906291834, 'mean_word_length': 3.2188235294117646, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3180696', 'n_tokens_mistral': 4445, 'n_tokens_neox': 4127, 'n_words': 482}