You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 14, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+22-19Lines changed: 22 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,21 +22,11 @@ You can contribute to this repo by forking it and sending us pull requests. Feed
22
22
23
23
You can build the root filesystem locally with Vagrant.
24
24
25
-
## Setting up build environment
26
-
Make sure you have [vagrant](https://docs.vagrantup.com/v2/installation/) and [docker-machine](https://docs.docker.com/machine/install-machine/) installed.
27
-
28
-
A `vagrant up` in the root folder of this repository sets up a Ubuntu Trusty VM with the latest Docker installed.
29
-
30
-
To use this Docker instance from your host one can use `docker-machine`.
31
-
To set it up with your Vagrant VM execute the following command:
25
+
### Setting up build environment
26
+
Make sure you have [vagrant](https://docs.vagrantup.com/v2/installation/) and [docker-machine](https://docs.docker.com/machine/install-machine/) installed. Then run the following command to create the Vagrant box and the Docker Machine connection. The Vagrant box is needed as a vanilla boot2docker VM is not able to run guestfish inside.
Now set the Docker environments to this new docker machine:
@@ -45,20 +35,33 @@ Now set the Docker environments to this new docker machine:
45
35
eval$(docker-machine env image-builder-rpi)
46
36
```
47
37
48
-
From here you can...
49
-
- ... just use `make` to make a new SD-Card image:
38
+
### Build the SD-Card image
39
+
40
+
From here you can just make the SD-Card image. The output will be written and compressed to `sd-card-rpi-dirty.img.zip`.
50
41
51
42
```bash
52
43
make sd-image
53
44
```
54
45
55
-
- ... run tests:
46
+
### Run Serverspec tests
47
+
48
+
To test the compressed SD-Card image with [Serverspec](http://serverspec.org) just run the following command. It will expand the SD-Card image in a Docker container and run the Serverspec tests in `builder/test/` folder against it.
Now flash the SD-Card image and boot up a Raspberry Pi. Run the [Serverspec](http://serverspec.org) integration tests in `builder/test-integration/` folder against your Raspberry Pi. Set the environment variable `BOARD` to the IP address or host name of your running Raspberry Pi.
57
+
58
+
```bash
59
+
flash sd-card-rpi-dirty.img.zip
60
+
BOARD=black-pearl.local make test-integration
61
+
```
62
+
63
+
This test works with any Docker Machine, so you do not need to create the Vagrant box.
64
+
62
65
## License
63
66
64
67
MIT - see the [LICENSE](./LICENSE) file for details.
0 commit comments