2014-01-31 08:38:54 -08:00
|
|
|
OS Image build scripts
|
2014-01-29 04:57:36 -08:00
|
|
|
======================
|
2013-04-05 07:23:17 -07:00
|
|
|
|
2014-01-29 04:47:06 -08:00
|
|
|
Cycle's OS is based on [NixOS](http://nixos.org), a linux distribution with a purely functional
|
|
|
|
package manager.
|
2013-11-27 12:54:15 -08:00
|
|
|
|
2014-01-31 08:38:54 -08:00
|
|
|
These scripts build .box images that can be used by [vagrant](http://vagrantup.com) for development, and other images suitable for production.
|
2013-11-27 12:54:15 -08:00
|
|
|
|
2014-01-30 14:00:41 -08:00
|
|
|
See [CycleSDK](https://bitbucket.org/oxdi/cycle-sdk) for the complete development environment (which makes use of the images generated here).
|
2014-01-29 04:57:36 -08:00
|
|
|
|
2013-11-27 14:04:36 -08:00
|
|
|
|
2013-11-27 12:54:15 -08:00
|
|
|
Building the images
|
|
|
|
-------------------
|
|
|
|
|
2014-01-29 04:47:06 -08:00
|
|
|
First install [packer](http://packer.io) and [virtualbox](https://www.virtualbox.org/)
|
2013-07-22 04:07:17 -07:00
|
|
|
|
|
|
|
Then:
|
|
|
|
|
2014-01-31 08:38:54 -08:00
|
|
|
```bash
|
2014-01-31 03:28:11 -08:00
|
|
|
packer build template.json
|
2014-01-29 04:47:06 -08:00
|
|
|
```
|
|
|
|
|
|
|
|
The .box image is now ready to go. Install it into Vagrant via:
|
|
|
|
|
2014-01-30 14:00:41 -08:00
|
|
|
Updating the public box image
|
|
|
|
-----------------------------
|
2014-01-29 04:47:06 -08:00
|
|
|
|
2014-01-31 08:38:54 -08:00
|
|
|
`s3put` is handy tool for copying files to Amazon S3, it's part of the [boto](https://github.com/boto/boto) library.
|
2013-11-27 12:54:15 -08:00
|
|
|
|
2014-01-30 14:00:41 -08:00
|
|
|
Install boto:
|
2013-11-27 12:54:15 -08:00
|
|
|
|
2014-01-31 08:38:54 -08:00
|
|
|
```bash
|
2014-01-30 14:00:41 -08:00
|
|
|
pip install boto
|
|
|
|
```
|
|
|
|
|
|
|
|
Push the .box image to S3 via s3put
|
|
|
|
|
2014-01-31 08:38:54 -08:00
|
|
|
```bash
|
|
|
|
s3put -a $AWS_ID -s $AWS_KEY -b oxdi -g public-read --prefix `pwd` cycle-xx.xx-x86_64-virtualbox.box
|
2014-01-30 14:00:41 -08:00
|
|
|
```
|
|
|
|
|
|
|
|
The box will then be available at http://amazonaws.com/oxdi/cycle64-virtualbox.box
|