How to use the @mapbox/cloudfriend.userData function in @mapbox/cloudfriend

To help you get started, we’ve selected a few @mapbox/cloudfriend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hotosm / tasking-manager / cloudformation / tasking-manager.template.js View on Github external
TargetValue: 85,
          PredefinedMetricSpecification: {
            PredefinedMetricType: 'ASGAverageCPUUtilization'
          }
        },
        Cooldown: 300
      }
  },
  TaskingManagerLaunchConfiguration: {
    Type: 'AWS::AutoScaling::LaunchConfiguration',
    Properties: {
      IamInstanceProfile: cf.ref('TaskingManagerEC2InstanceProfile'),
      ImageId: 'ami-0565af6e282977273',
      InstanceType: 'c5d.large',
      SecurityGroups: [cf.importValue(cf.join('-', ['hotosm-network-production', cf.ref('Environment'), 'ec2s-security-group', cf.region]))],
      UserData: cf.userData([
        '#!/bin/bash',
        'set -x',
        'export DEBIAN_FRONTEND=noninteractive',
        'export LC_ALL="en_US.UTF-8"',
        'export LC_CTYPE="en_US.UTF-8"',
        'dpkg-reconfigure --frontend=noninteractive locales',
        'sudo apt-get -y update',
        'sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade',
        'sudo add-apt-repository ppa:jonathonf/python-3.6 -y',
        'sudo apt-get update',
        'sudo apt-get -y install python3.6',
        'sudo apt-get -y install python3.6-dev',
        'sudo apt-get -y install python3.6-venv',
        'sudo apt-get -y install curl',
        'curl -sL https://deb.nodesource.com/setup_6.x > install-node6.sh',
        'sudo chmod +x install-node6.sh',
github hotosm / tasking-manager / scripts / aws / cloudformation / tasking-manager.template.js View on Github external
"01enable_cfn_hup": {
            "command": "systemctl enable cfn-hup.service"
            },
            "02start_cfn_hup": {
              "command": "systemctl start cfn-hup.service"
            }
          }
        }
      }
    },
    Properties: {
      IamInstanceProfile: cf.ref('TaskingManagerEC2InstanceProfile'),
      ImageId: 'ami-0565af6e282977273',
      InstanceType: 'c5d.large',
      SecurityGroups: [cf.importValue(cf.join('-', ['hotosm-network-production', cf.ref('NetworkEnvironment'), 'ec2s-security-group', cf.region]))],
      UserData: cf.userData([
        '#!/bin/bash',
        'set -x',
        'export DEBIAN_FRONTEND=noninteractive',
        'export LC_ALL="en_US.UTF-8"',
        'export LC_CTYPE="en_US.UTF-8"',
        'dpkg-reconfigure --frontend=noninteractive locales',
        'sudo apt-get -y update',
        'sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade',
        'sudo add-apt-repository ppa:deadsnakes/ppa -y',
        'sudo apt-get update',
        'sudo apt-get -y install python3.6',
        'sudo apt-get -y install python3.6-dev',
        'sudo apt-get -y install python3.6-venv',
        'sudo apt-get -y install curl',
        'curl -o install-node10.sh -sL https://deb.nodesource.com/setup_10.x',
        'sudo chmod +x install-node10.sh',
github hotosm / visualize-change / devops / visualize-change.template.js View on Github external
Properties: {
      IamInstanceProfile: cf.ref("VisualizeChangeEC2InstanceProfile"),
      ImageId: "ami-dfca85a0",
      InstanceType: "t2.large",
      BlockDeviceMappings: [
        {
          DeviceName: "/dev/sda1",
          Ebs: { VolumeSize: "150" }
        }
      ],
      SecurityGroups: [
        cf.importValue(
          cf.join("-", ["hotosm-network-production", cf.ref("Environment"), "ec2s-security-group", cf.region])
        )
      ],
      UserData: cf.userData([
        "#!/bin/bash",
        "set -x",
        "curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - ",
        "echo 'deb https://dl.yarnpkg.com/debian/ stable main' | sudo tee /etc/apt/sources.list.d/yarn.list",
        "sudo apt-get update && sudo apt-get install -y yarn git",
        "https://github.com/hotosm/visualize-change.git /dev/sda1/visualize-change && cd /dev/sda1/visualize-change/ ",
        "git reset --hard ${GitSha}",
        "# ./scripts/get-indonesia-tiles.sh",
        "./scripts/setup-docker-data-folders.sh",
        "if [ ${MAP_LAYER_MINZOOM} == 0 ]; then ./scripts/tiles-add-underzoom.sh; fi",
        "./scripts/build.prod.sh",
        "./scripts/start.prod.sh"
      ]),
      KeyName: "mbtiles"
    }
  },