Skip to content
Permalink
bb898190d4
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
118 lines (118 sloc) 4.34 KB
{
"min_packer_version": "0.8.6",
"description": "Grouper appliance ",
"variables": {
"profile": "xfs",
"disk_size": "20000",
"memory": "2048",
"cpus": "1",
"guest_os_type": "RedHat_64",
"ssh_username": "centos",
"ssh_password": "centos",
"region": "us-west-1",
"timestamper": "{{timestamp}}",
"outputfile_name": "grouper-appliance-centos7",
"build_number": "{{env `BUILD_NUMBER`}}"
},
"provisioners": [
{
"type": "shell",
"execute_command": "echo 'centos' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"script": "scripts/ansible.sh"
},
{
"type": "ansible-local",
"playbook_dir": "ansible-playbooks",
"playbook_file": "ansible-playbooks/grouper-appliance-vbox.yml"
},
{
"type": "shell",
"execute_command": "echo 'centos' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"script": "scripts/cleanup.sh"
},
{
"type": "shell",
"inline": ["sudo echo 'TIERBUILD='{{user `build_number`}} > /home/centos/buildenv.bash"]
}
],
"builders": [
{
"type": "virtualbox-iso",
"name": "grouper-appliance-centos7",
"vm_name": "grouper-appliance-centos7-{{user `profile`}}",
"headless": true,
"guest_os_type": "RedHat_64",
"disk_size": "{{user `disk_size`}}",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "{{user `memory`}}"],
["modifyvm", "{{.Name}}", "--cpus", "{{user `cpus`}}"],
["modifyvm", "{{.Name}}", "--ostype", "{{user `guest_os_type`}}"]
],
"iso_url": "http://mirrors.mit.edu/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso",
"iso_checksum": "27bd866242ee058b7a5754e83d8ee8403e216b93d130d800852a96f41c34d86a",
"iso_checksum_type": "sha256",
"http_directory": "http",
"boot_command": ["<tab> text ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks-{{user `profile`}}.cfg<enter><wait>"],
"boot_wait": "10s",
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"guest_additions_mode": "disable",
"shutdown_command": "sudo -S shutdown -P now",
"output_directory": "output-grouper-{{user `profile`}}",
"format": "ova"
},
{
"type": "vmware-iso",
"name": "grouper-appliance-centos7-vmware",
"vm_name": "{{user `outputfile_name`}}-{{user `profile`}}",
"headless": true,
"guest_os_type": "RedHat",
"disk_size": "{{user `disk_size`}}",
"vmx_data": {
"cpuid.coresPerSocket": "{{user `cpus`}}",
"memsize": "{{user `memory`}}",
"numvcpus": "{{user `cpus`}}"
},
"iso_url": "http://mirrors.mit.edu/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso",
"iso_checksum": "27bd866242ee058b7a5754e83d8ee8403e216b93d130d800852a96f41c34d86a",
"iso_checksum_type": "sha256",
"http_directory": "http",
"boot_command": ["<tab> text ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks-{{user `profile`}}.cfg<enter><wait>"],
"boot_wait": "10s",
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "sudo -S shutdown -P now",
"output_directory": "output-grouper-vmware-{{user `profile`}}-{{user `timestamper`}}",
"format": "vmx"
}
],
"post-processors": [
{
"type": "compress",
"only": ["grouper-appliance-centos7"],
"compression_level": "9",
"output": "builds/{{user `outputfile_name`}}-ova-{{user `timestamper`}}.tar"
},
{
"type": "compress",
"only": ["grouper-appliance-centos7-vmware"],
"compression_level": "9",
"output": "builds/{{user `outputfile_name`}}-vmware-{{user `timestamper`}}.tar"
},
{
"type": "amazon-import",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `region`}}",
"s3_bucket_name": "internet2-tier-ami-import-us-west-1",
"tags": {
"Description": "packer amazon-import-grouper-appliance {{user `timestamper`}}",
"Name": "TIER-Grouper Build: {{user `build_number`}}"
}
}
]
}