Skip to content

Commit

Permalink
Add publication of image for Google Compute Engine (closes #36)
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu committed Jun 27, 2018
1 parent c83e6c2 commit 5ae885b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
10 changes: 10 additions & 0 deletions Packerfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
"Release": "{{user `version`}}"
},
"type": "amazon-ebs"
},
{
"type": "googlecompute",
"image_description": "Snowplow Mini - The Snowplow Pipeline in a box",
"machine_type": "n1-standard-2",
"account_file": "account.json",
"project_id": "engineering-sandbox",
"source_image_family": "ubuntu-1404-lts",
"ssh_username": "ubuntu",
"zone": "us-central1-a"
}
],
"post-processors": [],
Expand Down
8 changes: 4 additions & 4 deletions provisioning/roles/base/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
- name: Update apt cache
apt: update-cache=yes cache_valid_time=86400
sudo: yes
become: yes

- name: install basic packages
sudo: yes
become: yes
apt: pkg={{ item }} state=latest
tags: [packages]
with_items:
Expand All @@ -15,8 +15,8 @@
lineinfile:
dest="/etc/resolvconf/resolv.conf.d/base"
line="nameserver 8.8.8.8"
sudo: yes
become: yes

- name: Update nameserver list
command: "resolvconf -u"
sudo: yes
become: yes
6 changes: 3 additions & 3 deletions provisioning/roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- include_vars: ../../common_vars.yml

- name: Setup the docker repository and install docker
sudo: yes
become: yes
shell: |
apt-get update
apt-get install apt-transport-https ca-certificates curl software-properties-common --yes
Expand All @@ -11,11 +11,11 @@
apt-get update && apt-get install docker-ce --yes
- name: Download docker-compose
sudo: yes
become: yes
shell: curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

- name: Apply executable permissions to the docker-compose binary
sudo: yes
become: yes
shell: chmod +x /usr/local/bin/docker-compose

- name: Copy docker-compose.yml
Expand Down
6 changes: 3 additions & 3 deletions provisioning/roles/packer/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
- name: Download Packer
sudo: yes
become: yes
shell: curl -o {{ packer_install_dir }}/{{ packer_archive }}.zip {{ packer_url }}

- name: Extract Packer
sudo: yes
become: yes
unarchive: copy=no src={{ packer_install_dir }}/{{ packer_archive }}.zip dest={{ packer_install_dir }}

- name: Remove downloaded packer_archive
sudo: yes
become: yes
shell: "rm -f {{ packer_install_dir }}/{{ packer_archive }}.zip"
2 changes: 1 addition & 1 deletion provisioning/roles/typescript/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Install Typescript, Browserify and Uglify
command: "{{ item }}"
sudo: yes
become: yes
with_items:
- "npm install -g [email protected]"
- "npm install -g [email protected]"
Expand Down

0 comments on commit 5ae885b

Please sign in to comment.