Skip to content

Instantly share code, notes, and snippets.

@pcn
Created March 13, 2019 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcn/33256b6b5d0c834ae4c2e84cd88bc2f1 to your computer and use it in GitHub Desktop.
Save pcn/33256b6b5d0c834ae4c2e84cd88bc2f1 to your computer and use it in GitHub Desktop.

Profile:

pcnclickhouse-1-staging:
    provider: <providername>-ec2-private-ips
    image: ami-013608a56ddba236f
    size: t2.medium
    ssh_username: ubuntu
    iam_profile: arn:aws:iam::<accnt-id>:instance-profile/iam_role_tier_blah-c1
    sync_after_install: all
    rename_on_destroy: True
    script_args: -C -F
    tag: {"Tier": "pcnclickhouse", "Environment": "staging", "Role": "pcnclickhouse"}
    block_device_mappings: [{"DeviceName": "/dev/sda1", "Ebs.VolumeSize": 30, "Ebs.VolumeType": "gp2"}, {"DeviceName": "/dev/sdg", "Ebs.VolumeSize": 1000, "Ebs.VolumeType": "gp2"}]
    volumes: []
    network_interfaces: [{"DeviceIndex": 0, "SubnetId": "subnet-ce8de3b5", "PrivateIPAddress": "192.168.192.105"}]
    ebs_optimized: False

The map:

pcnclickhouse-1-staging:
- pcnclickhouse-1-staging

The provider:

librato-ec2-private-ips:
  minion:
    master:
    - 192.168.204.137
  ssh_interface: private_ips
  id: 'use-instance-role-credentials'
  key: 'use-instance-role-credentials'
  private_key: /etc/salt/private_keypair.pem
  keyname: stage-keypair
  location: us-east-2
  ssh_username: ubuntu
  iam_profile: 'arn:aws:iam::<accnt-id>:instance-profile/company-default-stg'

  driver: ec2
@pcn
Copy link
Author

pcn commented Mar 14, 2019

I couldn't get this to work. I could get the address set by including the same structure in the map instead of the profile'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment