<commit_before>#cloud-config
manage_etc_hosts: true
manage_resolv_conf: false
runcmd:
  - sudo aws s3 cp s3://${bucket_name}/environments/${environment}/${colour}/swarm/ca_cert.pem /etc/docker/ca_cert.pem
  - sudo aws s3 cp s3://${bucket_name}/environments/${environment}/${colour}/swarm/server_key.pem /etc/docker/server_key.pem
  - sudo aws s3 cp s3://${bucket_name}/environments/${environment}/${colour}/swarm/server_cert.pem /etc/docker/server_cert.pem
  - sudo aws s3 cp s3://${bucket_name}/environments/${environment}/${colour}/swarm/client_key.pem /etc/docker/client_key.pem
  - sudo aws s3 cp s3://${bucket_name}/environments/${environment}/${colour}/swarm/client_cert.pem /etc/docker/client_cert.pem
  - sudo bash -c 'echo "vm.max_map_count=1048575" >> /etc/sysctl.conf'
  - sudo bash -c 'echo "vm.swappiness=1" >> /etc/sysctl.conf'
  - sudo sysctl -w vm.max_map_count=1048575
  - sudo sysctl -w vm.swappiness=1
  - export HOST_IP_ADDRESS=`ifconfig eth0 | grep "inet " | awk '{ print substr($2,6) }'`
  - sudo hostname > /etc/hostname
  - sudo systemctl daemon-reload
  - sudo service docker restart
  - sudo sh /update-route53-A.sh
write_files:
  - path: /etc/profile.d/variables
    permissions: '0644'
    content: |
        ENVIRONMENT=${environment}
        COLOUR=${colour}
  - path: /etc/systemd/system/docker.service.d/simple_dockerd.conf
    permissions: '0644'
    content: |
        [Service]
        ExecStart=
        ExecStart=/usr/bin/dockerd
  - path: /etc/docker/daemon.json
    permissions: '0644'
    content: |
        {
            "hosts": ["fd://", "tcp://0.0.0.0:2376", "unix:///var/run/docker.sock"],
            "dns": ["${hosted_zone_dns}", "8.8.8.8", "8.8.4.4"],<commit_msg>ensure ip address is update after reboot<commit_after>#cloud-config
manage_etc_hosts: true
manage_resolv_conf: false
runcmd:
  - sudo aws s3 cp s3://${bucket_name}/environments/${environment}/${colour}/swarm/ca_cert.pem /etc/docker/ca_cert.pem
  - sudo aws s3 cp s3://${bucket_name}/environments/${environment}/${colour}/swarm/server_key.pem /etc/docker/server_key.pem
  - sudo aws s3 cp s3://${bucket_name}/environments/${environment}/${colour}/swarm/server_cert.pem /etc/docker/server_cert.pem
  - sudo aws s3 cp s3://${bucket_name}/environments/${environment}/${colour}/swarm/client_key.pem /etc/docker/client_key.pem
  - sudo aws s3 cp s3://${bucket_name}/environments/${environment}/${colour}/swarm/client_cert.pem /etc/docker/client_cert.pem
  - sudo bash -c 'echo "vm.max_map_count=1048575" >> /etc/sysctl.conf'
  - sudo bash -c 'echo "vm.swappiness=1" >> /etc/sysctl.conf'
  - sudo sysctl -w vm.max_map_count=1048575
  - sudo sysctl -w vm.swappiness=1
  - export HOST_IP_ADDRESS=`ifconfig eth0 | grep "inet " | awk '{ print substr($2,6) }'`
  - sudo hostname > /etc/hostname
  - sudo systemctl daemon-reload
  - sudo service docker restart
  - sudo sh /update-route53-A.sh
bootcmd:
  - sudo bash -c "if [ -f '/update-route53-A.sh' ]; then sudo sh /update-route53-A.sh; fi"
write_files:
  - path: /etc/profile.d/variables
    permissions: '0644'
    content: |
        ENVIRONMENT=${environment}
        COLOUR=${colour}
  - path: /etc/systemd/system/docker.service.d/simple_dockerd.conf
    permissions: '0644'
    content: |
        [Service]
        ExecStart=
        ExecStart=/usr/bin/dockerd
  - path: /etc/docker/daemon.json
    permissions: '0644'
    content: |
        {
            "hosts": ["fd://", "tcp://0.0.0.0:2376", "unix:///var/run/docker.sock"],
            "dns": ["${hosted_zone_dns}", "8.8.8.8", "8.8.4.4"],
{'fraction_non_alphanumeric': 0.17075232459847844, 'fraction_numerical': 0.034375880529726684, 'mean_word_length': 3.2413381123058542, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1452271', 'n_tokens_mistral': 1427, 'n_tokens_neox': 1330, 'n_words': 229}