-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ubuntu18 #88
base: master
Are you sure you want to change the base?
Update ubuntu18 #88
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"variables": { | ||
"PACKER_OS_FLAVOUR": "ubuntu", | ||
"PACKER_BOX_NAME": "ubuntu-14.04.6-server-amd64", | ||
[ | ||
"PACKER_BOX_NAME": "ubuntu-18.04.3-live-server-amd64", | ||
"AWS_ACCESS_KEY_ID": "{{env `AWS_ACCESS_KEY_ID`}}", | ||
"AWS_SECRET_ACCESS_KEY": "{{env `AWS_SECRET_ACCESS_KEY`}}", | ||
"DIGITALOCEAN_API_TOKEN": "{{env `DIGITALOCEAN_API_TOKEN`}}" | ||
|
@@ -39,9 +40,9 @@ | |
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", | ||
"guest_os_type": "Ubuntu_64", | ||
"http_directory": "http", | ||
"iso_checksum": "b17d7c1e9d0321ad5810ba77b69aef43f0f29a5422b08120e6ee0576c4527c0e", | ||
"iso_checksum": "b9beac143e36226aa8a0b03fc1cbb5921cff80123866e718aaeba4edb81cfa63", | ||
"iso_checksum_type": "sha256", | ||
"iso_url": "http://releases.ubuntu.com/trusty/{{ user `PACKER_BOX_NAME` }}.iso", | ||
"iso_url": "http://releases.ubuntu.com/18.04/{{ user `PACKER_BOX_NAME` }}.iso", | ||
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", | ||
"ssh_password": "vagrant", | ||
"ssh_port": 22, | ||
|
@@ -59,7 +60,7 @@ | |
"access_key": "{{ user `AWS_ACCESS_KEY_ID` }}", | ||
"secret_key": "{{ user `AWS_SECRET_ACCESS_KEY` }}", | ||
"region": "us-east-1", | ||
"source_ami": "ami-10b68a78", | ||
"source_ami": "ami-0ac019f4fcb7cb7e6s", | ||
"instance_type": "t1.micro", | ||
"ssh_username": "ubuntu", | ||
"ami_name": "packer-app-server {{timestamp}}" | ||
|
@@ -68,16 +69,16 @@ | |
"type": "googlecompute", | ||
"account_file": "account.json", | ||
"project_id": "devops-intro-project", | ||
"source_image": "ubuntu-1404-trusty-v20150316", | ||
"source_image": "ubuntu-1804-bionic-v20181222", | ||
"zone": "us-central1-a", | ||
"image_name": "application-ubuntu-1404-{{timestamp}}", | ||
"image_name": "application-ubuntu-1804-{{timestamp}}", | ||
"machine_type": "n1-standard-1", | ||
"ssh_username": "ubuntu" | ||
}, | ||
{ | ||
"type": "digitalocean", | ||
"api_token": "{{ user `DIGITALOCEAN_API_TOKEN` }}", | ||
"image": "ubuntu-14-04-x64", | ||
"image": "ubuntu-18.04.3-live-server-amd64", | ||
"region": "tor1", | ||
"size": "512mb", | ||
"droplet_name": "udacity-devops", | ||
|
@@ -121,4 +122,4 @@ | |
} | ||
] | ||
] | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: New line missing. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
{ | ||
"variables": { | ||
"PACKER_OS_FLAVOUR": "ubuntu", | ||
"PACKER_BOX_NAME": "ubuntu-14.04.6-server-amd64", | ||
|
||
"PACKER_BOX_NAME": "ubuntu-18.04.3-live-server-amd64", | ||
"AWS_ACCESS_KEY_ID": "{{env `AWS_ACCESS_KEY_ID`}}", | ||
"AWS_SECRET_ACCESS_KEY": "{{env `AWS_SECRET_ACCESS_KEY`}}", | ||
"DIGITALOCEAN_API_TOKEN": "{{env `DIGITALOCEAN_API_TOKEN`}}" | ||
}, | ||
"builders": [ | ||
}, | ||
"builders": [ | ||
{ | ||
"type": "virtualbox-iso", | ||
"boot_command": [ | ||
|
@@ -39,14 +40,16 @@ | |
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", | ||
"guest_os_type": "Ubuntu_64", | ||
"http_directory": "http", | ||
"iso_checksum": "b17d7c1e9d0321ad5810ba77b69aef43f0f29a5422b08120e6ee0576c4527c0e", | ||
|
||
"iso_checksum": "b9beac143e36226aa8a0b03fc1cbb5921cff80123866e718aaeba4edb81cfa63", | ||
"iso_checksum_type": "sha256", | ||
"iso_url": "http://releases.ubuntu.com/trusty/{{ user `PACKER_BOX_NAME` }}.iso", | ||
"iso_url": "http://releases.ubuntu.com/18.04/{{ user `PACKER_BOX_NAME` }}.iso", | ||
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", | ||
"ssh_password": "vagrant", | ||
"ssh_port": 22, | ||
"ssh_username": "vagrant", | ||
"ssh_wait_timeout": "10000s", | ||
"type": "virtualbox-iso", | ||
"vm_name": "control-{{ user `PACKER_BOX_NAME` }}", | ||
"vboxmanage": [ | ||
["modifyvm", "{{.Name}}", "--memory", "1024"], | ||
|
@@ -59,35 +62,36 @@ | |
"access_key": "{{ user `AWS_ACCESS_KEY_ID` }}", | ||
"secret_key": "{{ user `AWS_SECRET_ACCESS_KEY` }}", | ||
"region": "us-east-1", | ||
"source_ami": "ami-10b68a78", | ||
"source_ami": "ami-0ac019f4fcb7cb7e6s", | ||
"instance_type": "t1.micro", | ||
"ssh_username": "ubuntu", | ||
"ami_name": "control-{{ user `PACKER_BOX_NAME` }}-{{timestamp}}" | ||
"ami_name": "packer-app-server {{timestamp}}" | ||
}, | ||
{ | ||
"type": "googlecompute", | ||
"account_file": "account.json", | ||
"project_id": "devops-intro-project", | ||
"source_image": "ubuntu-1404-trusty-v20150316", | ||
"source_image": "ubuntu-1804-bionic-v20181222", | ||
"zone": "us-central1-a", | ||
"image_name": "control-ubuntu-1404-{{timestamp}}", | ||
"image_name": "application-ubuntu-1804-{{timestamp}}", | ||
"machine_type": "n1-standard-1", | ||
"ssh_username": "ubuntu" | ||
}, | ||
{ | ||
"type": "digitalocean", | ||
"api_token": "{{ user `DIGITALOCEAN_API_TOKEN` }}", | ||
"image": "ubuntu-14-04-x64", | ||
"region": "tor1", | ||
"size": "512mb", | ||
"droplet_name": "udacity-devops", | ||
"private_networking": true | ||
} | ||
"type": "digitalocean", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra spaces, this needs to be run through a formatter to make it consistent. |
||
"api_token": "{{ user `DIGITALOCEAN_API_TOKEN` }}", | ||
"image": "ubuntu-18.04.3-live-server-amd64", | ||
"region": "tor1", | ||
"size": "512mb", | ||
"droplet_name": "udacity-devops", | ||
"private_networking": true | ||
} | ||
], | ||
|
||
"provisioners": [ | ||
{ | ||
"type": "shell", | ||
"execute_command": "echo 'vagrant'|sudo -S -E bash '{{.Path}}'", | ||
"execute_command": "echo 'vagrant'|{{.Vars}} sudo -S -E bash '{{.Path}}'", | ||
"scripts": [ | ||
"scripts/update.sh" | ||
] | ||
|
@@ -97,22 +101,15 @@ | |
"only": ["virtualbox-iso"], | ||
"execute_command": "echo 'vagrant'|sudo -S -E bash '{{.Path}}'", | ||
"scripts": [ | ||
"scripts/virtualbox.sh", | ||
"scripts/vagrant.sh" | ||
] | ||
}, | ||
{ | ||
"type": "file", | ||
"source": "../jenkins-config", | ||
"destination": "/tmp" | ||
"scripts/virtualbox.sh", | ||
"scripts/vagrant.sh" | ||
] | ||
}, | ||
{ | ||
"type": "shell", | ||
"execute_command": "echo 'vagrant'|sudo -S -E bash '{{.Path}}'", | ||
"scripts": [ | ||
"scripts/jenkins.sh", | ||
"scripts/graphite.sh", | ||
"scripts/nginx.sh", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are jenkins, graphite and nginx removed? |
||
"scripts/application.sh", | ||
"scripts/cleanup.sh" | ||
] | ||
} | ||
|
@@ -123,8 +120,8 @@ | |
"type": "vagrant", | ||
"except": ["googlecompute", "digitalocean"], | ||
"compression_level": "9", | ||
"output": "../output/{{.Provider}}/control-{{ user `PACKER_BOX_NAME` }}.box" | ||
"output": "{{.Provider}}/{{ user `PACKER_BOX_NAME` }}-appserver_{{.Provider}}.box" | ||
} | ||
] | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash -eux | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't remove the hashbang |
||
|
||
echo "Installing Virtualbox Guest Utils" | ||
apt-get -y install dkms | ||
VBOX_VERSION=$(cat /home/vagrant/.vbox_version) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra
[