Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29543

CloudFormation - Partitioning EBS root volume

$
0
0

Below is the cloudformation template to create EC2 instance:

"EC2Instance":{
        "Type": "AWS::EC2::Instance",
        "Properties":{
            "ImageId": "ami-099999999999a27",
            "InstanceType": "t2.micro",
            "SubnetId": { "Ref": "SubnetId"},
            "KeyName": { "Ref": "KeyName"},
            "SecurityGroupIds": [ { "Ref": "EC2InstanceSecurityGroup"} ],
            "IamInstanceProfile": { "Ref" : "EC2InstanceProfile"},
            "UserData":{
                "Fn::Base64": { "Fn::Join": ["", [
                    "#!/bin/bash\n",
                    "echo ECS_CLUSTER=", { "Ref": "EcsCluster" }, ">> /etc/ecs/ecs.config\n",
                    "groupadd -g 1000 jenkins\n",
                    "useradd -u 1000 -g jenkins jenkins\n",
                    "mkdir -p /a/b\n",
                    "chown -R jenkins:jenkins /a/b\n"
                ] ] }
            },
            "Tags": [ { "Key": "Name", "Value": { "Fn::Join": ["", [ { "Ref": "AWS::StackName"}, "-instance" ] ]} }]
        }
    },

We would like to have /a/b mounted to dedicated partition with specific size.

Can we partition EBS volume that is used by EC2 instance? using CloudFormation

Do we need packer for this configuration? using amazon-ebs builder


Viewing all articles
Browse latest Browse all 29543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>