Skip to content

Commit

Permalink
Merge pull request #2 from Dalee/updates-06-04-2017
Browse files Browse the repository at this point in the history
16.04.2
  • Loading branch information
arkady-emelyanov authored Apr 12, 2017
2 parents 91978e0 + 82ee663 commit 468b851
Show file tree
Hide file tree
Showing 40 changed files with 534 additions and 617 deletions.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/packer_cache/*
!/packer_cache/.gitkeep
/build/*
!/build/.gitkeep
vagrant.retry
packer_cache/*
!packer_cache/.gitkeep
build/*
!build/.gitkeep
46 changes: 22 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
# Dalee base images
# General purpose Web-development Vagrant box

[Ubuntu box](https://atlas.hashicorp.com/Dalee/boxes/ubuntu)
heavily used internally for all our development processes.
This [Ubuntu 16.04](https://atlas.hashicorp.com/Dalee/boxes/ubuntu)
box, which is heavily used internally.

Also, you can check our cool [Ansible roles](https://galaxy.ansible.com/Dalee/).
They allow you to build PHP/PostgreSQL or Node.js ready-to-use environment on top
of Ubuntu box (there are more roles, actually).
> Also, you can check out our [Ansible roles](https://galaxy.ansible.com/Dalee/).
They allow quickly build PHP or Node.js based ready-to-use environment
on top of this box.

## Artifacts
What included:
* VirtualBox Guest Additions (of course)
* [mailhog](https://github.com/mailhog/MailHog) (web-interface on :8025)
* [nullmail](https://github.com/bruceg/nullmailer) (system-wide MTA)
* `en_US.UTF-8` and `ru_RU.UTF-8` locales (default: `en_US.UTF-8`)
* Pre-installed software: `ansible`, `mc`, `git`, etc..
* Filesystem optimization: `noatime`, `nodiratime`
* Easy add new interfaces: `source /etc/network/interfaces.d/*` already
included in `/etc/network/interfaces`
* Grub optimizations: `quiet`, `fastboot`

Removed software:
* `cron` — it's a dangerous idea have working cron in development vm
* `syslog` — just use `journalctl`

https://atlas.hashicorp.com/Dalee/

## DIY

Expand All @@ -22,24 +34,18 @@ In case you want to build boxes yourself.
* Packer >= 0.11.0, https://www.packer.io/

### How to build
Use `packer` to build images:

* Ubuntu 14.04.05 LTS (deprecated, Ansible role support dropped)
* Ubuntu 16.04.1 LTS
* Alpine Linux 3.4.6
Use `packer` to build image:

```bash
packer build ./ubuntu14.json
packer build ./ubuntu16.json
packer build ./alpine346.json
```

Start any build process and take a rest, depending on your system,
build will finish in ~20-30 minutes.

### Self-hosted boxes

Do not want to upload boxes to Atlas? Here is the solution:
Do not want to upload box to Atlas? Here is the solution:

Check out `example/example-metadata.json` and `example/example-vagrantfile` for self-hosted boxes.

Expand All @@ -48,14 +54,6 @@ To calculate correct sha1 signature for a box, use:
openssl sha1 ./build/*.box
```

## Notes about Alpine Box

Alpine box has built-in VirtualBox Guest Additions, but,
Vagrant itself lacks of support Alpine configuration (like ethernet configuration).

There is a [Alpine plugin](https://github.com/maier/vagrant-alpine) for Vagrant,
but there are some NFS mounts problems with undefined root cause.

## License

Code is unlicensed. Do whatever you want with it. [Set Your Code Free](http://unlicense.org/).
16 changes: 16 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Vagrant.require_version ">= 1.8.0"
Vagrant.configure("2") do |config|

project_name = "baseimage"
project_root = "/home/web/project"

config.vm.box = "Dalee/ubuntu"
config.vm.provider :virtualbox do |v|
v.memory = 512
v.cpus = 1
v.gui = true
end

config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder ".", project_root, type: "nfs"
end
70 changes: 0 additions & 70 deletions alpine346.json

This file was deleted.

4 changes: 2 additions & 2 deletions example/example-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"version": "201525120051",
"providers": [{
"name": "virtualbox",
"url": "file:///Users/arkady/Projects/dalee/build.vagrant/build/dalee-ubuntu.box",
"url": "file:///path/to/git/repo//build/dalee-ubuntu.box",
"checksum_type": "sha1",
"checksum": "6e18f2396339c2d07632f27f16061d4bdc4224b8"
"checksum": "<insert sha1 here>"
}]
}]
}
2 changes: 1 addition & 1 deletion example/example-vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Vagrant.require_version ">= 1.8.0"
Vagrant.configure("2") do |config|

config.vm.box = "dalee/ubuntu"
config.vm.box_url = "file:///Users/arkady/Projects/dalee/build.vagrant/build/dalee-ubuntu.json"
config.vm.box_url = "file:///path/to/git/repo/build/dalee-ubuntu.json"
config.vm.provider :virtualbox do |v|
v.memory = 512
v.cpus = 1
Expand Down
15 changes: 0 additions & 15 deletions http/alpine346/kickstart.cfg

This file was deleted.

61 changes: 0 additions & 61 deletions http/ubuntu14/kickstart.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/alpine346/compact.sh

This file was deleted.

25 changes: 0 additions & 25 deletions scripts/alpine346/vagrant.sh

This file was deleted.

75 changes: 0 additions & 75 deletions scripts/alpine346/vboxguest.sh

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/ubuntu14/compact.sh

This file was deleted.

Loading

0 comments on commit 468b851

Please sign in to comment.