Rickard, 

{
    "description": "Copy the centos.org CentOS 6 AMI into our account so 
that we can add boot volume encryption.",
    "min_packer_version": "0.11.0",
    "variables": {
        "aws_region": "us-east-1",
        "access_key": "",
        "secret_key": "",
        "ssh_username": "centos"
    },
    "builders": [
        {
            "type": "amazon-ebs",
            "ena_support": true,
            "ami_name": "CentOS Linux 6 x86_64 HVM EBS ENA (encrypted) 
{{isotime \"20060102\"}}",
            "ami_description": "CentOS Linux 6 x86_64 HVM EBS ENA 
(encrypted) {{isotime \"20060102\"}}",
            "instance_type": "t2.micro",
            "region": "{{user `aws_region`}}",
            "source_ami_filter": {
                "filters": {
                    "owner-alias": "aws-marketplace",
                    "product-code": "6x5jmcajty9edm3f211pqjfn2",
                    "virtualization-type": "hvm",
                    "state": "available",
                    "root-device-type": "ebs" 
                },
                "owners": [ "679593333241" ],
                "most_recent": true
            },
            "ami_virtualization_type": "hvm",
            "ssh_username": "{{user `ssh_username`}}",
            "associate_public_ip_address": true,
            "tags": {
                "Name": "CentOS 6",
                "OS": "CentOS",
                "OSVER": "6"
            },
            "encrypt_boot": true,
            "communicator": "ssh",
            "ssh_pty": true
        }
    ],
    "provisioners": [
        {
            "type": "shell",
            "inline": [
                " echo '** installing base packages....'",
                "sudo yum install -y epel-release",
                "sudo yum install -y cloud-utils-growpart",
                "sudo yum install -y nfs-utils",
                "sudo yum install -y dracut-modules-growroot",
                "sudo yum update -y ",
                "sudo yum clean all"
                ]
                },
                {
            "type": "shell",
            "execute_command": "sudo -S sh '{{.Path}}'",
            "inline_shebang": "/bin/sh -e -x",
            "inline": [
                "echo '** Shreding sensitive data ...'",
                "shred -u /etc/ssh/*_key /etc/ssh/*_key.pub",
                "shred -u /root/.*history /home/{{user 
`ssh_username`}}/.*history",
                "shred -u /root/.ssh/authorized_keys /home/{{user 
`ssh_username`}}/.ssh/authorized_keys",
                "sync; sleep 1; sync"
            ]
        }
    ]
}

On Tuesday, January 1, 2019 at 7:46:17 AM UTC-6, Rickard von Essen wrote:
>
> Can you link to the market place item?
>
> On Mon, Dec 31, 2018 at 5:15 AM Frank Dias <[email protected] 
> <javascript:>> wrote:
>
>> Rickard,
>>
>> I have tried that and I am still seeing the market restriction on the 
>> created AIM.
>> the only way I have gotten around this has been to create a second volume 
>> and dd the original the second the switch volume mounts. after I have done 
>> this the market restriction is removed.
>>
>> I would think that there is a better way to do this with packer.
>>
>> Frank
>>
>> On Saturday, December 22, 2018 at 6:21:31 AM UTC-6, Rickard von Essen 
>> wrote:
>>>
>>> I would start by using the amazon-ebs builder and a provisioner script 
>>> that installs the ENA driver. That is probably all you have to do. 
>>>
>>> On Mon, Dec 17, 2018, 15:54 Frank Dias <[email protected] wrote:
>>>
>>>> I have a packer build that uses the AMI source from market place and 
>>>> the parket place image does not support Gen5 instances.
>>>> during the build I am adding the required drivers the use Gen5 
>>>> instance. I have done this manually and now trying to get it into a packer 
>>>> build.
>>>>
>>>> any suggestions as to how to do this with packer.
>>>>
>>>>
>>>> my manual process;
>>>>
>>>> install ENA drivers
>>>> create second volume
>>>> dd first volume to second volume
>>>> shutdown instance
>>>> unmount first volume
>>>> mount second volume
>>>> start image to confirm working instance
>>>> shutdown instance
>>>> create ami from instance
>>>> launch instance from new ami, no market place instance restrictions
>>>>
>>>> thanks in advance
>>>>
>>>>   
>>>>
>>>> -- 
>>>> This mailing list is governed under the HashiCorp Community Guidelines 
>>>> - https://www.hashicorp.com/community-guidelines.html. Behavior in 
>>>> violation of those guidelines may result in your removal from this mailing 
>>>> list.
>>>>  
>>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>>> IRC: #packer-tool on Freenode
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Packer" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/packer-tool/32c4b445-95c7-432e-91ff-49a302eb8af9%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/packer-tool/32c4b445-95c7-432e-91ff-49a302eb8af9%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>> This mailing list is governed under the HashiCorp Community Guidelines - 
>> https://www.hashicorp.com/community-guidelines.html. Behavior in 
>> violation of those guidelines may result in your removal from this mailing 
>> list.
>>  
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/fb639f03-1ac1-48a5-9060-98da7e1f2830%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/fb639f03-1ac1-48a5-9060-98da7e1f2830%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/61693bc9-46bb-48b3-9c48-16edafcf25eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to