Skip to content

Commit

Permalink
New Box Release: 0.7.1
Browse files Browse the repository at this point in the history
* Just get rid of Atlas builds
* Update Ubuntu Base Image
* Fix Package Conflict with Adwaita
* Fix automated OMF + Prelude install
* Upgrade Build image memory
  (apt was repeatedly shot by OOM Killer)
  • Loading branch information
bascht committed Feb 18, 2017
1 parent 35093f3 commit 480a456
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 29 deletions.
1 change: 1 addition & 0 deletions ansible/group_vars/all
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apt_packages:
- adwaita-icon-theme
- aspell-de
- atom
- bitlbee
Expand Down
1 change: 1 addition & 0 deletions ansible/requirements.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- src: angstwad.docker_ubuntu
version: v2.2
4 changes: 1 addition & 3 deletions ansible/tasks/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
apt_repository: repo={{ item }}
with_items: "{{ apt_ppas }}"
- name: Install missing packages
apt: name={{ item }}
apt: name={{ item }} install_recommends=yes update_cache=yes
with_items: "{{ apt_packages }}"
- name: Set default shell for {{ vm_user }} user
user: name={{ vm_user }} shell=/usr/bin/fish groups=docker append=yes
- gem: name=tmuxinator state=present user_install=no
- gem: name=homesick state=present user_install=no
- stat: path=/dev/vdb
register: code_disk
- stat: path=/home/bascht/.emacs.d/init.el
register: emacs_conf
- name: Mount Code Volume
mount: name=/home/bascht/Code src='/dev/vdb' fstype=ext4 state=mounted
when: code_disk.stat.isblk is defined and code_disk.stat.isblk
Expand Down
6 changes: 6 additions & 0 deletions ansible/tasks/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@
when: omf.stat.isdir is not defined
become: yes
become_user: "{{ vm_user }}"
- name: "Provide IP for Tmux + Shell to pick up"
ignore_errors: yes
copy:
dest: /var/run/vm_ip
mode: "0744"
content: "{{ ansible_eth0.ipv4.address|default(omit) }}"
12 changes: 12 additions & 0 deletions packer/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "bascht/vm",
"description": "My local dev environment",
"short_description": "Don't use it. Unless you are shure what you do. Even then: Don't use it.",
"versions": [{
"version": "0.7.1",
"providers": [{
"name": "libvirt",
"url": "../packer_qemu_libvirt.box"
}]
}]
}
2 changes: 1 addition & 1 deletion packer/scripts/ansible.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
apt-get install -y ansible
apt install -y ansible
ansible-galaxy install -r /tmp/requirements.yml
6 changes: 3 additions & 3 deletions packer/scripts/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ echo "cleaning up dhcp leases"
rm /var/lib/dhcp/*

# Clean up Apts Rubbish bin
apt-get -y autoremove --purge
apt-get -y clean
apt-get -y autoclean
apt -y autoremove --purge
apt -y clean
apt -y autoclean

# Clean up logs + journals
find /var/log -maxdepth 1 -type f -exec cp /dev/null {} \;
Expand Down
34 changes: 12 additions & 22 deletions packer/template.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{
"variables": {
"atlas_username": "{{env `ATLAS_USERNAME`}}",
"atlas_name": "{{env `ATLAS_NAME`}}",
"username": "bascht",
"password": "bascht",
"build_version": "0.5.0.{{env `ATLAS_BUILD_ID`}}"
},
"push": {
"name": "{{user `atlas_username`}}/{{user `atlas_name`}}",
"vcs": true,
"base_dir": "packer"
"build_version": "0.7.1",
"ubuntu_iso": "http://de.releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso",
"ubuntu_checksum": "f529548fa7468f2d8413b8427d8e383b830df5f6"
},
"provisioners": [
{
Expand Down Expand Up @@ -54,14 +49,14 @@
"builders": [
{
"type": "qemu",
"iso_url": "http://de.releases.ubuntu.com/16.04.1/ubuntu-16.04.1-server-amd64.iso",
"iso_checksum": "de5ee8665048f009577763efbf4a6f0558833e59",
"iso_url": "{{ user `ubuntu_iso`}}",
"iso_checksum": "{{user `ubuntu_checksum`}}",
"iso_checksum_type": "sha1",
"ssh_wait_timeout": "30s",
"shutdown_command": "sudo shutdown -P now",
"disk_size": 20000,
"format": "qcow2",
"headless": false,
"headless": true,
"accelerator": "kvm",
"http_directory": "packer/http",
"http_port_min": 10082,
Expand Down Expand Up @@ -98,23 +93,18 @@
"console-setup/ask_detect=false ",
"keyboard-configuration/layoutcode=de ",
"vga=788 noprompt quiet --<enter>"
],
"qemuargs": [
[ "-m", "2048M" ]
]
}
],
"post-processors": [
[{
"type": "vagrant",
"keep_input_artifact": false
},
{
"type": "atlas",
"artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}",
"artifact_type": "vagrant.box",
"metadata": {
"provider": "libvirt",
"version": "{{user `build_version`}}"
}
}
"keep_input_artifact": true,
"compression_level": 9
}
]
]
}

0 comments on commit 480a456

Please sign in to comment.