Commit Graph

566 Commits

Author SHA1 Message Date
Andrew Rynhard
f045b10dd4 fix: add support for trustd username and password auth back in (#604)
We should still support username and password for backwards compatibility.
This also sets us up for for implementing auth for users using something like LDAP in the future.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-30 17:50:30 -07:00
Andrew Rynhard
287d5b09d4 chore: fix install command in packer template (#603)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-30 11:27:51 -07:00
Andrew Rynhard
aba66b41e6 chore: add make target for building AMIs (#602)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-30 10:21:51 -07:00
Andrew Rynhard
0df1d9ca70 feat(init): run udevd as a container (#601)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-30 08:48:48 -07:00
Andrew Rynhard
3a002418a0 chore: update example outputs in README (#600)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-29 22:50:04 -07:00
Andrew Rynhard
13739b4f59 fix(osctl): ensure image is present (#599)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-29 21:57:31 -07:00
Andrew Rynhard
3585ab2ad0 chore: prepare release v0.1.0-alpha.24 (#598)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
v0.1.0-alpha.24
2019-04-29 17:59:13 -07:00
Andrew Rynhard
0a4a48b43c fix(osctl): fix issue with downloading image (#597)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-29 17:23:05 -07:00
Andrew Rynhard
13f9177e43 fix(osd): read log files only on write events (#583)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-29 13:51:32 -07:00
Andrew Rynhard
6e555c4559 feat(osctl): expose osd and api server ports on master-1 (#592)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-29 11:51:39 -07:00
Brad Beam
7a8acebbe2 chore: Make buildkit cache OS dependent (#595)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-04-29 11:08:01 -07:00
Tim Jones
4341411c16 refactor(init): add helper for getting specific kernel parameters (#596)
Signed-off-by: Tim Jones <timniverse@gmail.com>
2019-04-29 10:58:51 -07:00
Tim Jones
7127998f56 feat(init): Add support for hostname kernel parameter (#591)
Signed-off-by: Tim Jones <timniverse@gmail.com>
2019-04-29 09:50:43 -07:00
Brad Beam
e0122908a8 chore(ci): Update buildkit v0.5 (#594)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-04-29 11:25:04 -05:00
Andrew Rynhard
52f2fc92e5 chore: add proposals template (#590)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-28 15:53:22 -07:00
Andrew Rynhard
020d11d4ba feat(init): enforce KSPP kernel parameters (#585)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-28 13:12:07 -07:00
Andrew Rynhard
ea99788ef1 feat(trustd): use a token instead of username and password (#586)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-28 12:18:56 -07:00
Andrew Rynhard
9b4fec0fa8 feat(osctl): add ability to create docker based clusters (#584)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-28 12:06:03 -07:00
Andrew Rynhard
9e70513042 chore: add slack notification to drone (#589)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-28 11:17:07 -07:00
Andrew Rynhard
a0c57700a4 chore: disable codecov patch status (#588)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-28 09:25:32 -07:00
Andrew Rynhard
c74c09006a chore: add codecov configuration file (#587)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-28 06:08:38 -07:00
Andrew Rynhard
20662217a2 feat: add ability to generate userdata secrets (#581)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-26 20:56:40 -07:00
Andrew Rynhard
2a4b56d4a1 feat(init): load only the images required by the node type (#582)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-26 20:13:48 -07:00
Andrew Rynhard
fcf7ec10af chore(ci): apply manifests and wait for healthy nodes (#580)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-26 19:36:52 -07:00
Andrey Smirnov
ab2917e833 feat(init): implement init gRPC API, forward reboot to init (#579)
This implements insecure over-file-socket gRPC API for init with two
first simplest APIs: reboot and shutdown (poweroff).

File socket is mounted only to `osd` service, so it is the only service
which can access init API. Osd forwards reboot/shutdown already
implemented APIs to init which actually executes these.

This enables graceful shutdown/reboot with service shutdown, sync, etc.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-04-26 23:04:24 +03:00
Andrew Rynhard
2f6d5e0260 feat: add package for generating userdata (#574)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-26 12:48:26 -07:00
Andrew Rynhard
fc05224b4f feat: add shutdown command (#577)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-26 08:53:12 -07:00
Andrew Rynhard
a8fa1f5cd1 feat(osctl): add df command (#569)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-26 08:24:31 -07:00
Brad Beam
50c51ac717 fix: Explicitly set upstream/forward servers for coredns in dev setup (#578)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-04-26 10:10:37 -05:00
Andrey Smirnov
505b5022c4 feat(init): implement graceful shutdown of 'init' (#562)
Most crucial changes in `init/main.go`: on shutdown now Talos tries
to stop gracefully all the services. All the shutdown paths are unified,
including poweroff, reboot and panic handling on startup.

While I was at it, I also fixed bug with containers failing to start
when old snapshot is still around.

Service lifecycle is wrapped with `ServiceRunner` object now which
handles state transitions and captures events related to state changes.
Every change goes to the log as well.

There's no way to capture service state yet, but that is planned to be
implemented as RPC API for `init` which is exposed via `osd` to `osctl`.

Future steps:

1. Implement service dependencies for correct startup order and
shutdown order.

2. Implement service health, so that we can say "start trustd when
containerd is up and healthy".

3. Implement gRPC API for init, expose via osd (service status, restart,
poweroff, ...)

4. Impement 'String()' for conditions, so that we can see what service
is waiting on right now.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-04-26 16:53:19 +03:00
Brad Beam
1a5be8da47 osctl top enhancements (#568)
* feat(osctl): Automatic sizing of top window

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>

* feat(osctl): Format top output in proper columns

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>

* feat(osctl): Add sort by cpu/rss options

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>

* feat(osctl): Add ability to run once (no gui)

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-04-24 16:44:57 -05:00
Andrew Rynhard
68c2a2735d chore: prepare release v0.1.0-alpha.23 (#565)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
v0.1.0-alpha.23
2019-04-24 10:40:34 -07:00
Brad Beam
a5161e575e chore: Update kernel image (#564)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-04-24 09:55:44 -05:00
Brad Beam
3f358b12ae feat(osctl): Add osctl top (#560)
Also adds pkg/proc as the backing package for top data

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-04-23 21:25:41 -05:00
Brad Beam
3319e56ea3 chore(ci): Update buildkit to 0.4 (#538)
Make use of local bin directory so we can prevent the
need for sudo to install buildctl.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-04-23 20:52:31 -05:00
Andrey Smirnov
a858cb4986 refactor: extract 'restart' piece of the runners into wrapper runner (#559)
This changes `runner.Runner` API to support more methods to allow for
containerd runner to create container object only once, and start/stop
tasks to implement restarts.

New API: `Open()` (initialize), `Run()` (run once until exits), `Stop()`
(stop running instance), `Close()` (free resource, no longer available
for new `Run()`).

So the sequence might be: `Open`, `Run`, `Stop`, `Run`, `Stop`, `Close`.

Process and containerd runners were updated for the new API, and
'restart' part was removed, now both runners only run the task once.

Restart piece was implemented in an abstract way for any wrapped
`runner.Runner` in the `runner/restart` package. Restart supports three
restart policies: `Once`, `UntilSuccess` and `Forever`.

Service API was changed slightly to return the `runner.Runner`
interface, and `system.Services` now handles running the service.

For all the services, code was adjusted to either return runner (run
once), or was wrapped with `restart` runner to provide restart policy.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-04-23 01:25:26 +03:00
Andrew Rynhard
544c9259fc chore: use the rootfs-base and initramfs-base images for builds (#558)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-18 19:31:43 -07:00
Brad Beam
271d28244b fix(osd): Fix k8s.io namespace logs (#557)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-04-18 08:49:33 -07:00
Andrey Smirnov
7da7c8c2ff refactor: add stub unit-tests to non-trivial Go packages (#556)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-04-17 13:25:22 -07:00
Andrew Rynhard
0d6abdf89c feat: detect if an install has already occurred (#549)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-17 12:43:47 -07:00
Andrew Rynhard
3bc00ce514 chore: add slack invite badge (#555)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-17 09:10:59 -07:00
Brad Beam
46bdf2371c fix(osd): Fix osctl ps output (#554)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-04-17 08:51:19 -05:00
Andrey Smirnov
7cbc177a59 refactor: add unit-test for containerd image import (#553)
Just because we can easily do that, this also covers prior work
on converting panics to errors: #518

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-04-17 00:31:33 +03:00
Andrey Smirnov
d29e27ee33 refactor: containerd runner refactoring and unit-tests (#551)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-04-16 13:56:52 -07:00
Andrew Rynhard
bf94cbcb2c docs: update README.md with drone build status (#552)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-16 10:50:25 -07:00
Andrew Rynhard
e2f5debd18 chore: ignore checksum files create in release (#550)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
v0.1.0-alpha.22
2019-04-16 08:05:20 -07:00
Andrew Rynhard
7b78aa72f9 chore: remove modules from build output (#548)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-15 22:44:59 -07:00
Andrew Rynhard
0a6b06b903 chore: remove release target in favor of build target (#547)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-15 21:53:14 -07:00
Andrew Rynhard
9b37f78eb9 chore: optimize the build for pull requests and tags (#546)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-15 20:47:44 -07:00
Andrew Rynhard
3d7a4fd657 chore: use gitmeta for image tag (#545)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-15 19:24:27 -07:00