979 Commits

Author SHA1 Message Date
Andrew Rynhard
1553a31d20 chore: prepare v0.2.0-alpha.3 release
Please see the CHANGELOG for a list of changes.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-22 12:56:25 -07:00
Spencer Smith
089890f36b chore: setup gce for e2e builds
This PR will provide a basis for running e2e tests on GCE several times
a day. We'll need to add a cron event to the drone repo once merged.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-07-22 12:46:02 -04:00
Andrew Rynhard
88bdedf3e6 fix: make /etc/resolv.conf writable
We need /etc/resolv.conf to be writable so that networkd can update it.
This change achieves this by creating a symlink at /etc/resolv.conf that
points to /var/resolv.conf.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-19 20:37:00 -07:00
Andrey Smirnov
7df9ef049c chore: repair 'make all'
Target 'binaries' was referencing non-existent `Dockerfile` target, so
any `make all` failed.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-19 08:12:23 -07: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
Spencer Smith
a15499d25a fix: Only generate pki from trustd if not control plane
This PR will fix a bug where the non-init nodes were not generating
their certs locally and relying on trustd instead. This broke down
because we aren't saving the CA key when we're generating with the
trustd identity function (because we don't need it for workers).

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-07-18 20:20:38 -04:00
Matt Welch
8d3ee182d9 docs: minor spelling corrections.
Minor spelling corrections.

Signed-off-by: Matt Welch <matt.welch@gmail.com>
2019-07-18 16:40:08 -07:00
Spencer Smith
c9f0dbbd4c feat: set default mtu for gce platform
This PR is needed so that the eth0 device will have the proper mtu when
coming online in google cloud

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-07-17 19:16:50 -04:00
Spencer Smith
4a31b66850 feat: allow mtu specification for network devices
This PR is needed so we can specify an MTU of 1460 for GCE VMs

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-07-17 13:51:23 -07:00
Andrew Rynhard
7a5f56cd10 chore: prepare release v0.1.0-rc.0
This commit updates the CHANGELOG.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-17 13:27:38 -07:00
Brad Beam
f650e32833 fix: Truncate hostname if necessary
We should only set the hostname to the actual host name instead of FQDN.
This hasnt been much of an issue, but GCE does return the FQDN for the
hostname field in dhcp.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-07-17 09:17:26 -07:00
Spencer Smith
6fd685dad0 feat: allow specification of mtu for cluster create
This PR adds the ability to set mtu for the cluster create networks.
Default is 1440, which seems to be the default for calico.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-07-17 07:34:28 -07:00
Andrew Rynhard
75ea51633c fix: prefix file stat with rootfs prefix
Without this, the check for the existence of the symlinks created in the
rootfs preparation step will always fail. On a reboot init will fail
because it tries to create a symlink that already exists.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-16 22:09:30 -07:00
Andrew Rynhard
4c4141d161 chore: publish Azure image on releases
Produces a VHD suitable for uploading to Azure and creating a Talos
node.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-16 21:21:53 -07:00
Andrew Rynhard
fe2b81f4b4 fix: create symlinks to /etc/ssl/certs
In order to accomodate the various ways that SSL certs are managed by
the different Linux distros, kubeadm creates control plane compoents
with volume mounts of the type DirectoryOrCreate to all well known SSL
cert locations. This change creates symlinks to /etc/ss/certs at all the
well known paths to account for the fact that the rootfs is read-only.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-16 16:35:59 -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
Brad Beam
7adef1ea62 feat(init): Add azure as a supported platform
Update initramfs to interact with azure endpoints for userdata.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-07-16 12:59:53 -07:00
Brad Beam
e9482a4041 fix: Fix integration of extra kernel args
Switch from `StringSliceVar` to `StringArrayVar` to maintain commas
in kernel args.

Update entrypoint script to allow specifying extra kernel args.

Remove default console settings in kernel config.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-07-16 14:38:55 -05: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>
v0.2.0-alpha.2
2019-07-15 15:55:15 -07:00
Andrew Rynhard
0a21502e4d chore: prepare release v0.2.0-alpha.2
Details can be found in the CHANGELOG.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-15 14:40:42 -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
Brad Beam
58537faa8b fix(init): Fix routes endpoint
Temporary workaround while we get more information on the
specifics for what is failing.

Ref: #795
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-07-15 07:35:56 -07:00
Andrew Rynhard
992c54c667 chore: improve network setup logging
Minor improvements to help when debugging.
Without this, if bringing up the default interface fails, the logs can
be misleading.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-13 15:52:49 -07:00
Andrew Rynhard
c40802b122 fix: return non-nil response in reset
The gRPC response will fail to be decoded because our reply is nil.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-13 15:52:25 -07:00
Andrew Rynhard
d4a59b7c14 fix(init) mount root partition as read-only
This uses the correct mount flag for read-only.
We mistakenly had the flag for opening a file as read-only.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-12 21:34:59 -07:00
Andrew Rynhard
d197d5c6cd feat: add install flag for extra kernel args
In addition to adding a flag, this adds a field to the user data that allows
for extra kernel arguments to be specified.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-12 13:27:44 -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
Andrey Smirnov
c10ef0f15a chore: extract CRI client as separate package
This is preparation for implementing CRI runner.

CRI client moved into its own package, I split it into multiple files
and added rudimentary tests for it.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-11 01:52:19 +03:00
Andrey Smirnov
82fe5b55e5 chore: make unit-tests use isolated instances of containerd
This makes test launch their own isolated instance of containerd with
its own root/state directories and listening socket address. Each test
brings this instance up/down on its own.

Add options to override containerd address in the code (used only in the
tests).

Enable parallel go test runs once again.

P.S. I wish I could share that 'SetupSuite' phase across the tests, but
afaik there's no way in Go to share `_test.go` code across packages. If
we put it as normal package, this might pull in test dependencies (like
`testify`) into production code, which I don't like.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-10 19:46:32 +03:00
Brad Beam
551e24e268 fix(init): Dont log an error when context canceled
When we receive all the necessary files from trustd, we cancel the context. This
was treated as an error case and a message was logged accordingly. However,
this case was not really an error versus a signal to stop trying to fetch a
given file.

Fixes #723

Add basic FileSet tests. Minor refactor to FileSet call to allow easier testing
Add context canceled test for download
Add config tests and trustd coverage

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-07-06 14:54:02 -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
Andrew Rynhard
2fcdc66c98 chore: bump codecov project target to 33%
This gives ~0.7% of buffer.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-05 18:03:26 -07:00
Andrew Rynhard
6e52abed97 chore: remove last updated field from proposal template
This field is superfluous since we can get this from git.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-05 17:31:15 -07:00
Andrew Rynhard
b5ed02a810 chore: prepare release v0.2.0-alpha.1
CHANGELOG was auto updated.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
v0.2.0-alpha.1
2019-07-05 15:59:59 -07:00
Spencer Smith
ff9934cfe2 chore: update toolchain version and output created config files
Decided to combine two very small changes (which I'm now grumpy at myself for doing).

First, we'll update the toolchain image versions to allow for the use of a new containerd and runc. Also updated go.mod and go.sum to make use of newer containerd version. Closes #743 and #744.

Second, I added the bit of logic to osctl config generate to determine the working directory and let the user know that we created the various yaml files there. Closes #760.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-07-05 17:59:25 -04:00
Brad Beam
c194621e56 feat(initramfs): Add kernel arg for default interface
Should allow us to handle edge cases where eth0 is not the primary interface

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-07-05 12:17:18 -07:00
Andrew Rynhard
8d9dde97fa chore: prepare release v0.1.0-beta.1
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-04 22:15:16 -07:00
Andrew Rynhard
2c6bf9b1fd fix: append probed block devices
This change fixes a bug that caused installations to fail.
On each iteration, the previously discovered block devices were dropped because the `probed` variable was reassigned.
We now append the discovered block devices to a slice declared outside the for loop.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-04 21:39:34 -07:00
Andrew Rynhard
e0e20c905f chore: upgrade conform to v0.1.0-alpha.16
This version of conform fixes a few message format errors that were confusing when a policy was violated.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-04 18:27:25 -07:00
Andrew Rynhard
5d8ee0a3a5 fix: use existing logic to perform reset
This PR moves the reset API to the init API definition.
It leverages the same code we use for upgrades.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-04 18:26:14 -07:00
Andrew Rynhard
fd84d975f4 chore: upgrade conform to v0.1.0-alpha.15
This PR also makes use of two new options:

- maximumOfOneCommit: enforces that a commit is only one commit ahead of master
- requireCommitBody: requires that a commit contains a body

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-04 16:43:18 -07:00
Andrey Smirnov
077ea451b5
chore: use 'fast' gitmeta (#836)
See PR https://github.com/talos-systems/gitmeta/pull/10,
https://github.com/talos-systems/gitmeta/pull/12

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-04 23:46:55 +03:00
Andrew Rynhard
3914e4052a
chore: fix CHANGELOGs (#834)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-04 11:46:30 -07:00
Andrew Rynhard
f12301281d
chore: create a CHANGELOG.md for each minor version (#833)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-04 11:29:36 -07:00
Andrey Smirnov
5d91d762ce feat(osd): implement container metrics for CRI inspector (#824)
This refactors metrics interface to remove containerd-specific stuff and
make it common for CRI & containerd.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-04 11:25:15 -07:00
Andrey Smirnov
ab95261bd8 chore: update stretchr/testify to master version (#832)
This fixes the panic stackstraces not being printed, e.g.
https://github.com/stretchr/testify/issues/771

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-04 10:04:52 -07:00
Andrew Rynhard
105226f5a0
chore: fix GCE image creation (#830)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-04 09:36:17 -07:00
Andrew Rynhard
d82444a42d
chore: revert #816 (#829)
This reverts commit 11f8392e53986da6c124037ffab06064ec04aedd.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-04 08:43:34 -07:00