100 Commits

Author SHA1 Message Date
Andrew Rynhard
82c706a0fb feat: upgrade Kubernetes to v1.16.0
Brings in Kubernetes v1.16.0.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-19 20:19:29 -07:00
Andrew Rynhard
6efd6fbe08 chore: move gRPC API to public
In order for other projects to make use of our APIs, they must not
reside underneath the internal directory. This moves the protobuf
definitions to a top-level "api" directory and scopes them according to
their domain. This change also removes generated code from the gitignore
file so that users don't have to generate the code themseleves.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-19 08:55:13 -07:00
Andrew Rynhard
ab4e058489 feat: upgrade Kubernetes to v1.16.0-rc.2
This brings in the release candidate for Kubernetes v1.16.0.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-16 14:56:55 -07:00
Andrew Rynhard
75746266ce feat: upgrade Kubernetes to v1.16.0-rc.1
This brings in the latest RC of 1.16.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-12 20:20:48 -07:00
Andrew Rynhard
5ee554128e chore: move from gofumpt to gofumports
The gofumports does everything that gofumpt does with the addition of
formatting imports. This change proposes the use of the `-local` flag so
that we can have imports separated in the following order:

- standard library
- third party
- Talos specific

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-12 07:49:12 -07:00
Andrey Smirnov
980829708e chore: upgrade golancgi-lint to 1.18.0
New linter 'funlen' was disabled as too many functions break the default
limit, but might be considered for the future.

To limit peak memory usage, `GOGC=50` was added to the golangci-lint run
to make Go's garbage collector more aggressive. With this setting peak
seems to be around 8Gb.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-09-11 15:18:57 -07:00
Andrew Rynhard
2955428850 chore: format code with gofumpt
The gofumpt linter is a stricter drop-in replacement for gofmt. The
rules are ones that I strongly agree with and I think it would be better
if we added this linter instead of nit picking every PR.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-11 11:03:29 -07:00
Andrew Rynhard
38690d72df chore: remove unneeded packages
This removes packages we don't need anymore.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-10 08:12:07 -07:00
Andrew Rynhard
44dd2fc7c9 chore: remove packer from installer
This moves to making AWS releases align with Azure, and GCP. We no
longer need packer since we will now release an artifact that users can
import.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-09 18:54:37 -07:00
Brad Beam
1373806165 fix(init): Enable containerd subreaper
Should take care of our issue with Zombies

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-08-30 14:32:13 -07:00
Andrey Smirnov
029374f07d chore: disable go test result cache
Go by default caches unit-tests results via build cache, so if source
code doesn't have any changes, test results are cached on package level.
As our unit-tests are not that pure and depend on the environment, it
would be more helpful to make sure all the unit-tests during each build.

Setting number of test runs to one disable test result cache (but build
cache is still being used).

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-08-30 22:03:00 +03:00
Andrey Smirnov
de49903a5f chore: fix location of Go build cache mount for unit-tests-race
This step is based on `golang` image, so `GOCACHE` is set in a bit of a
different way.

No big deal, but should speed up subsequent runs a bit.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-08-29 16:35:14 -07:00
Andrew Rynhard
bf8fc1dcbd chore: lint protobuf definitions
This adds linting to our protobuf definitions via prototool.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-27 18:12:36 -07:00
Spencer Smith
739e232896 feat: upgrade kubernetes to v1.16.0-beta.1
This PR will upgrade to the latest beta of v1.16 in order to get us
closer to catching the v1.16.0 release as soon as it drops.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-08-27 13:25:33 -04:00
Brad Beam
692571bdec feat(networkd): Add grpc endpoint
Allows us to list routes and interface details

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-08-25 19:48:08 -07:00
Brad Beam
313c118ad0 refactor(networkd): Replace networkd with a standalone app
This is a major rewrite of our network subsystem.

- This changes networkd to run as a standalone app versus internal goroutine
- This changes out the netlink package with the more idiomatic netlink/rtnetlink
  packages
- This changes the initial network bootstrap/discovery from using a single
  interface to attempting to bring up all interfaces
- This moves us back on to the upstream dhcp library

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-08-21 13:24:51 -05:00
Andrew Rynhard
8c73c38b8a chore: enforce one sentence per line in Markdown files
This is widely considered best practice, we should enforce it.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-17 10:15:27 -07:00
Andrew Rynhard
7970f977b7 chore: add markdownlint
This will give us a standard tool for linting Markdown files.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-17 03:53:52 -07:00
Brad Beam
76a9c15044 feat: Add gRPC server for ntp
Part of the API refactor; this introduces a gRPC server for ntp.
This allows the ability to query node time and check time against
specific ntp servers.

This refactor also moves the ntp functionality into a sub package for
better project organization.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-08-16 09:46:43 -07:00
Brad Beam
70a478895f feat(proxyd): Add gRPC server
Part of the API refactor; this introduces a gRPC server for proxyd
to expose some of the internal state.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-08-15 16:35:03 -05:00
Andrew Rynhard
582298ac0b feat: upgrade Linux to v5.2.8
Updates the kernel image to pull the kernel from.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-14 12:07:10 -07:00
Andrew Rynhard
8786916fd0 chore: build drone YAML via jsonnet
This PR aims to DRY the drone config file by using Jsonnet to generate
it.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-09 22:30:37 -07:00
Andrey Smirnov
2227d1f6b6 chore: add race-enabled test run
As Go race detector doesn't work under libmuscl, use stock glibc-based
golang container.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-08-09 17:12:34 +03:00
Spencer Smith
902577b4dc feat: upgrade kubernetes to v1.16.0-alpha.3
This PR updates the kubernetes version constant, as well as pulls in the
new kubeadm image with the last alpha of v1.16.0 baked in. Additionally,
moves the CNI daemon sets to apps/v1, since they're now out of beta.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-08-07 16:05:07 -04:00
Andrew Rynhard
90c91807bd refactor: restructure the project layout
This change moves packages into more appropriate places.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-01 22:19:42 -07:00
Andrey Smirnov
3024c26a55 chore: update dockerfile/buildkit versions
New buildkit release: https://github.com/moby/buildkit/releases/tag/v0.6.0

New release was published for buildkit's dockerfile:
https://github.com/moby/buildkit/releases/tag/dockerfile%2F1.1.2-experimental,
so we can stick to release version now.

These releases include fixes/implementation for `RUN --security=insecure`.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-08-01 01:05:42 +03:00
Andrew Rynhard
e63c882b89 refactor: split machined into phases
This change aims to standardize the boot process. It introduces the
concept of a phase, which is comprised of tasks. Phases are ran in serial and
the tasks that make up a phase are ran concurrently.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-29 12:40:03 -07:00
Andrey Smirnov
3e6993c648 chore: fix build cache
Remove `-a` flag to `go build` which caused cache to be missed all the
time. Add cache mount where missing, update path to match Go build cache
exactly.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-26 10:38:00 -07:00
Andrew Rynhard
b7a9acbe88 refactor: move setup logic into machined
The responsibility of init should only be to mount the rootfs. This
change moves Talos specific logic into machined. This will allow us to
define a version of Talos in a single binary instead of split across
two. This will enable cleaner upgrades and helps make the codebase
easier to reason about.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-26 07:48:49 -07:00
Andrew Rynhard
a7d76b9410 fix: Run cleanup script earlier in rootfs build
This change fixes a bug that caused the API server to fail due to a
missing directory at /usr/share/ca-certificates.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-25 14:51:13 -07:00
Andrew Rynhard
0ec17e4169 feat: run rootfs from squashfs
This change moves the rootfs to a squashfs image.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-25 08:38:31 -07:00
Andrey Smirnov
b1c184b616 chore: fix GOCACHE dir location
`go env GOCACHE` tells it's actually `/.cache` in our build environment
(probably because `$HOME` is not set?)

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-25 00:44:57 +03:00
Andrey Smirnov
8c59adb9dc chore: allow to run tests only for specified packages
This allows to do `make test TESTPKGS=./internal/app/machined`.

Also update Dockerfile slug as
https://github.com/moby/buildkit/pull/1081 was merged into master.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-23 22:17:22 +03:00
Andrey Smirnov
9f9acf1f05 chore: run tests in the buildkit itself
This relies on two PRs to the buildkit:

* https://github.com/moby/buildkit/pull/1081
* https://github.com/moby/buildkit/pull/1085

Sysfs fix was merged to upstream, so updated tag, while using
`Dockerfile` slug I can switch to dockerfile2llb with support for
`--security=insecure`.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-19 07:53:49 -07:00
Andrew Rynhard
8e8aae98dd feat: add machined
This commit splits our current init into init and machined.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-16 13:12:21 -07:00
Andrew Rynhard
40ae00d90c chore: add step to drone for kernel
Now that we manage dependencies manually, we need to explicitly build
the kernel target so that vmlinuz and vmlinux are placed into the build
directory.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-15 15:55:15 -07:00
Andrew Rynhard
0c17564398 chore: move init to /sbin
In order to run Talos with ignite, we need to have init at /sbin/init.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-15 13:26:09 -07:00
Andrew Rynhard
1e9548d149 feat: use new pkgs for initramfs and rootfs
This brings in the newly compiled libraries and binaries from our new
pkg builds.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-15 10:32:29 -07:00
Andrew Rynhard
666f04fdbc feat: update kernel
This kernel update brings in:

- modules support
- BPF support
- Azure support

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-10 20:19:59 -07:00
Andrew Rynhard
50eb51938c chore: prevent duplicate build of test container
This change removes the test-container step, and consolidates it to only a
test step. This prevents the build of the test container being done
twice.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-06 11:29:18 -07:00
Brad Beam
c1ec77ef42 feat: Use individual component steps for drone
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-07-05 23:11:40 -07:00
Andrey Smirnov
200eb513f9
chore(ci): download golangci-lint only once (#802)
When inherited from `base`, any source file change is causing
golangci-lint to be re-downloaded.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-06-28 22:00:52 +03:00
Andrew Rynhard
85afe4f828
feat: use eudev for udevd (#780)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-06-25 19:25:57 -07:00
Andrey Smirnov
ce1103d227 chore: tidy modules and verify module tidyness on build (#757)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-06-21 21:18:08 -07:00
Andrew Rynhard
1f36f0e7df
refactor(osctl): use UserHomeDir to detect user home directory (#749)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-06-20 17:57:57 -07:00
Spencer Smith
95b107d884
chore(ci): modularize integration test (#722)
Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-06-06 09:28:53 -04:00
Andrey Smirnov
ee297da1a2
chore: enable GOPROXY for go modules (#703)
Announcement: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/golang-announce/0wo8cOhGuAI/v96KeTYtBwAJ

This should improve module download time as `go` no longer needs
to clone full repositories.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-31 23:59:52 +03:00
Andrew Rynhard
18a1536b01
feat: use osctl in installer (#654)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-15 16:14:30 -07:00
Andrew Rynhard
f0e162a7f5
refactor: move osinstall into osctl (#629)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 08:49:32 -07:00
Andrew Rynhard
7676a31b20
chore: move osinstall to cmd (#620)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-07 06:41:03 -07:00