2014-01-29 04:57:36 -08:00
|
|
|
Cycle OS build scripts
|
|
|
|
======================
|
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-30 14:00:41 -08:00
|
|
|
These scripts build .box images that can be used by [vagrant](http://vagrantup.com), and ISO images that can be installed on bare metal.
|
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:
|
|
|
|
|
2013-04-05 07:23:17 -07:00
|
|
|
```
|
2014-01-29 04:47:06 -08:00
|
|
|
packer build cycle64-template.json
|
|
|
|
```
|
|
|
|
|
|
|
|
The .box image is now ready to go. Install it into Vagrant via:
|
|
|
|
|
|
|
|
```
|
|
|
|
vagrant box add cycle64 cycle64-virtualbox.box
|
2013-04-05 07:23:17 -07:00
|
|
|
```
|
2013-11-27 12:54:15 -08:00
|
|
|
|
2014-01-30 14:00:41 -08:00
|
|
|
Updating the public box image
|
|
|
|
-----------------------------
|
2014-01-29 04:47:06 -08:00
|
|
|
|
2014-01-30 14:00:41 -08:00
|
|
|
`s3put` is handy command line wrapper 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-30 14:00:41 -08:00
|
|
|
```
|
|
|
|
pip install boto
|
|
|
|
```
|
|
|
|
|
|
|
|
Push the .box image to S3 via s3put
|
|
|
|
|
|
|
|
```
|
|
|
|
s3put -a $AWS_ID -s $AWS_KEY -b oxdi -g public-read --prefix `pwd` cycle64-virtualbox.box
|
|
|
|
```
|
|
|
|
|
|
|
|
The box will then be available at http://amazonaws.com/oxdi/cycle64-virtualbox.box
|