Skip to content

Instantly share code, notes, and snippets.

@HighwayofLife
Last active March 5, 2025 12:49
Show Gist options
  • Save HighwayofLife/076d3f026642fb14dbaad9f5847bc0ce to your computer and use it in GitHub Desktop.
Save HighwayofLife/076d3f026642fb14dbaad9f5847bc0ce to your computer and use it in GitHub Desktop.

Revisions

  1. HighwayofLife revised this gist Jun 30, 2020. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions cloud_init.yaml
    Original file line number Diff line number Diff line change
    @@ -9,14 +9,19 @@ packages:

    # Enable ipv4 forwarding, required on CIS hardened machines
    write_files:
    - path: /etc/sysctl.d/enabled_ipv4_forwarding.conf
    - path: /etc/sysctl.d/99-enable-ipv4-forwarding.conf
    content: |
    net.ipv4.conf.all.forwarding=1
    # create the docker group
    groups:
    - docker

    # Add default auto created user to docker group
    system_info:
    default_user:
    groups: [docker]

    # Install Docker, for production, consider pinning to stable versions
    runcmd:
    - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
    @@ -25,8 +30,3 @@ runcmd:
    - apt-get install -y docker-ce docker-ce-cli containerd.io
    - systemctl start docker
    - systemctl enable docker

    # Add default auto created user to docker group
    system_info:
    default_user:
    groups: [docker]
  2. HighwayofLife revised this gist Jun 23, 2020. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions cloud_init_2.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #cloud-config

    packages:
    - docker.io

    # create the docker group
    groups:
    - docker

    # Add default auto created user to docker group
    system_info:
    default_user:
    groups: [docker]
  3. HighwayofLife created this gist Jun 23, 2020.
    32 changes: 32 additions & 0 deletions cloud_init.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    #cloud-config

    packages:
    - apt-transport-https
    - ca-certificates
    - curl
    - gnupg-agent
    - software-properties-common

    # Enable ipv4 forwarding, required on CIS hardened machines
    write_files:
    - path: /etc/sysctl.d/enabled_ipv4_forwarding.conf
    content: |
    net.ipv4.conf.all.forwarding=1
    # create the docker group
    groups:
    - docker

    # Install Docker, for production, consider pinning to stable versions
    runcmd:
    - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
    - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    - apt-get update -y
    - apt-get install -y docker-ce docker-ce-cli containerd.io
    - systemctl start docker
    - systemctl enable docker

    # Add default auto created user to docker group
    system_info:
    default_user:
    groups: [docker]