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
This reworks the README with a bunch of fixes, including but not limited to:
Updating with respect to the rest of the tinkerbell project
Simpler sentences
Grammar/spelling fixes
Better nix help
Better syntax highling for terminal sessions
Signed-off-by: Manuel Mendez <github@i.m.mmlb.dev>
Copy file name to clipboardExpand all lines: README.md
+61-56Lines changed: 61 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,36 +5,35 @@ It runs in-memory, installs operating system, and handles deprovisioning.
5
5
6
6
## Motivation
7
7
8
-
<!-- TODO: Move this to the documentation repository once this is part of the Tinkerbell organisation. -->
9
-
10
-
One of the [Tinkerbell] components is the operating system installation environment.
11
-
Currently, Tinkerbell uses [OSIE].
12
-
That implementation is open-sourced by Equinix Metal and it is serving the purpose of provisioning and de-provisioning hardware at a huge scale.
13
-
But why we started this project?
14
-
15
-
- Because we like to Hack the Kernel!
16
-
- Tinkerbell architecture leaves an open door in terms of the operating system installation environment you can use, it serves one for simplicity ,but users can write their own.
8
+
One of the [Tinkerbell] components is the Operating System Installation Environment (OSIE).
9
+
The Tinkerbell project originally used [OSIE] as its default OSIE.
10
+
That implementation was open-sourced by Equinix Metal as is and was difficult to modify/extend.
11
+
(Not to mention confusing, [OSIE] is our OSIE, hook is a new OSIE and you can have your very own OSIE too)
12
+
We started this project for the following reasons:
13
+
14
+
- Because we like to hack on the Kernel!
15
+
- Tinkerbell architecture leaves an open door in terms of the OSIE you can use, one is provided by default for simplicity, but users can write their own.
17
16
This is an implementation to validate that the model works (it does!! this is why we are here)
18
-
- Looking at the CI/CD build time for OSIE is~1h on average
19
-
- The building process is not standardised, which is critical for an open-source project because it causes friction for contributors.
20
-
This project, as highlighted later in this page, uses [LinuxKit] a tool provided by Docker, now part of the Linux Computing Foundation.
17
+
- Looking at the CI/CD build time for [OSIE] was~1h on average
18
+
- The [OSIE] build process was not standardised, which is critical for an open-source project because it causes friction for contributors.
19
+
This project, as highlighted later in this page, uses [LinuxKit].
21
20
It gives us:
22
21
- Documentation about how the building phase works
23
22
- A clear and defined CLI and [specification] (YAML)
- It is not easy to explain to the Tinkerbell community how OSIE works and the components it is made for, a lot of them are coming from specific Equinix Metal operational experience and they are not strictly needed in Tinkerbell.
28
-
There is an ongoing conversation from the contributors about a replacement or a complete refactoring for OSIE.
25
+
- Different output formats: ISO, init ramkdisk, aws, docker, rpi3... see [formats].
26
+
- It was not easy to explain to the Tinkerbell community how [OSIE] works and the components it is made for.
27
+
A lot of the components were Equinix Metal specific and are not strictly needed in Tinkerbell.
29
28
30
29
## Architecture
31
30
32
-
The hook project aims to provide an "in-place" swappable set of files (`kernel`/`initramfs`) that can be used to replace the [OSIE] environment that comes from Equinix Metal.
31
+
The hook project aims to provide an "in-place" swappable set of files (`kernel`/`initramfs`) that can be used to function as the Tinkerbell OSIE.
33
32
The key aims of this new project:
34
33
35
34
- Immutable output
36
35
- Batteries included (but swappable if needed)
37
-
- Ease of build (Subsequent builds of hook are ~47 seconds)
36
+
- Ease of build (subsequent builds of hook are ~47 seconds)
38
37
- Lean / simple design
39
38
- Clean base to build upon
40
39
@@ -43,31 +42,37 @@ The linuxkit project combines a Linux kernel with a number of additional contain
43
42
We have built upon the minimal set of components:
44
43
45
44
- containerd (the engine to start/stop all other components in a LinuxKit OS)
46
-
-dhcp (for network access)
47
-
-ntp (network time)
45
+
-dhcpd (for network access)
46
+
-ntpd (network time)
48
47
- rngd (random number gen for entropy)
49
48
50
49
To this minimal build, we've added our own set of containers that will provide the functionality needed for a `tink-worker` to run successfully:
51
50
52
51
### hook-docker
53
52
54
-
The `hook-docker` container builds upon the upstream `dind` (docker-in-docker) container and adds the additional functionality to retrieve the certificates needed for the docker engine to communicate with the Tinkerbell repository **before** it starts the docker engine.
55
-
The docker engine will be exposed through the `/var/run/docker.sock` that will use a bind mount so that the container `hook-bootkit` can access it.
53
+
The `hook-docker` container builds upon the upstream `dind` (docker-in-docker) container.
54
+
It adds the additional functionality to retrieve the certificates needed for the docker engine to communicate with the Tinkerbell repository **before** it starts the docker engine.
55
+
The docker engine will be exposed through the `/var/run/docker.sock` that will use a bind mount so that the container `bootkit` can access it.
56
56
57
57
### hook-bootkit
58
58
59
59
The `hook-bootkit` container will parse the `/proc/cmdline` and the metadata service in order to retrieve the specific configuration for tink-worker to be started for the current/correct machine.
60
-
It will then speak with the `hook-docker` engine API through the shared `/var/run/docker.sock`, where it will ask the engine to run the `tink-worker:latest` container, which in turn will begin to execute the workflow/actions associated with that machine.
60
+
It will then speak with the `hook-docker` engine API through the shared `/var/run/docker.sock`, where it will ask the engine to run the `tink-worker:latest` container.
61
+
`tink-worker:latest` will in turn begin to execute the workflow/actions associated with that machine.
61
62
62
63
## How to use hook with Sandbox
63
64
64
-
[sandbox] is a project that helps you to create and run the Tinkerbell stack locally with Vagrant, on Equinix Metal with Terraform and, acts as a guide to deploying Tinkerbell wherever you like.
65
-
I will tell you how you can change the default operating system installer environment called [OSIE] with this project.
65
+
[sandbox] is a project that helps you to create and run the Tinkerbell stack.
66
+
You can use it to run the stack locally with Vagrant, on Equinix Metal with Terraform or just plain docker-compose.
67
+
It acts as a guide to deploying Tinkerbell wherever you like.
68
+
Hook has become the default OSIE in sandbox, thus no extra action is needed to use hook.
69
+
66
70
67
-
There are essentially two methods a manual one and a more automatic one.
68
-
Have a look at the manual one even if you intend to use the automatic one to learn what what the automation does for you.
71
+
## How to build and use hook with Sandbox
69
72
70
-
### The manual way
73
+
### Using a published build
74
+
75
+
### Using a local/unpublished build
71
76
72
77
When you start sandbox in vagrant, for example as part of the provisioning step for the provisioner machine the `setup.sh` script gets executed.
73
78
The script does a bunch of things the one we care about here is the `setup_osie` function.
@@ -77,15 +82,15 @@ If you ran sandbox you already have that directory.
77
82
You can even move or delete that directory because we have to replace it with the release package containing the new operating system.
78
83
After you have removed the directory, it is time to re-create it:
0 commit comments