Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API #942

Merged
merged 7 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ The following settings are set for you automatically by [pluto](sources/api/) ba
* `settings.updates.metadata-base-url`: The common portion of all URIs used to download update metadata.
* `settings.updates.targets-base-url`: The common portion of all URIs used to download update files.
* `settings.updates.seed`: A `u32` value that determines how far into in the update schedule this machine will accept an update. We recommending leaving this at its default generated value so that updates can be somewhat randomized in your cluster.
* `settings.updates.version-lock`: Controls the version that will be selected when you issue an update request. Can be locked to a specific version like `v1.0.0`, or `latest` to take the latest available version. Defaults to `latest`.
* `settings.updates.ignore-waves`: Updates are rolled out in waves to reduce the impact of issues. For testing purposes, you can set this to `true` to ignore those waves and update immediately.

#### Time settings

Expand Down
15 changes: 14 additions & 1 deletion packages/os/os.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Source110: mark-successful-boot.service
# 2xx sources: tmpfilesd configs
Source200: migration-tmpfiles.conf
Source201: host-containers-tmpfiles.conf
Source202: thar-be-updates-tmpfiles.conf
bcressey marked this conversation as resolved.
Show resolved Hide resolved

BuildRequires: %{_cross_os}glibc-devel

Expand Down Expand Up @@ -86,6 +87,12 @@ Requires: %{_cross_os}apiserver = %{version}-%{release}
%description -n %{_cross_os}thar-be-settings
%{summary}.

%package -n %{_cross_os}thar-be-updates
Summary: Dispatches Bottlerocket update commands
Requires: %{_cross_os}apiserver = %{version}-%{release}
%description -n %{_cross_os}thar-be-updates
%{summary}.

%package -n %{_cross_os}servicedog
Summary: Manipulates systemd units based on setting changes
Requires: %{_cross_os}apiserver = %{version}-%{release}
Expand Down Expand Up @@ -160,6 +167,7 @@ mkdir bin
-p pluto \
-p bork \
-p thar-be-settings \
-p thar-be-updates \
-p servicedog \
-p host-containers \
-p storewolf \
Expand All @@ -186,7 +194,7 @@ install -d %{buildroot}%{_cross_bindir}
for p in \
apiserver \
early-boot-config netdog sundog schnauzer pluto bork \
thar-be-settings servicedog host-containers \
thar-be-settings thar-be-updates servicedog host-containers \
storewolf settings-committer \
migrator \
signpost updog logdog;
Expand Down Expand Up @@ -242,6 +250,7 @@ install -p -m 0644 \
install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:200} %{buildroot}%{_cross_tmpfilesdir}/migration.conf
install -p -m 0644 %{S:201} %{buildroot}%{_cross_tmpfilesdir}/host-containers.conf
install -p -m 0644 %{S:202} %{buildroot}%{_cross_tmpfilesdir}/thar-be-updates.conf

%cross_scan_attribution --clarify %{_builddir}/sources/clarify.toml \
cargo --offline --locked %{_builddir}/sources/Cargo.toml
Expand Down Expand Up @@ -284,6 +293,10 @@ install -p -m 0644 %{S:201} %{buildroot}%{_cross_tmpfilesdir}/host-containers.co
%{_cross_bindir}/thar-be-settings
%{_cross_unitdir}/settings-applier.service

%files -n %{_cross_os}thar-be-updates
%{_cross_bindir}/thar-be-updates
%{_cross_tmpfilesdir}/thar-be-updates.conf

%files -n %{_cross_os}servicedog
%{_cross_bindir}/servicedog

Expand Down
1 change: 1 addition & 0 deletions packages/os/thar-be-updates-tmpfiles.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d /run/cache/thar-be-updates 0755 root root -
2 changes: 2 additions & 0 deletions packages/os/updog-toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
metadata_base_url = "{{settings.updates.metadata-base-url}}"
targets_base_url = "{{settings.updates.targets-base-url}}"
seed = {{settings.updates.seed}}
version_lock = "{{settings.updates.version-lock}}"
ignore_waves = {{settings.updates.ignore-waves}}
1 change: 1 addition & 0 deletions packages/release/release.spec
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Requires: %{_cross_os}host-containers
Requires: %{_cross_os}settings-committer
Requires: %{_cross_os}systemd
Requires: %{_cross_os}thar-be-settings
Requires: %{_cross_os}thar-be-updates
Requires: %{_cross_os}migration
Requires: %{_cross_os}updog
Requires: %{_cross_os}logdog
Expand Down
1 change: 1 addition & 0 deletions packages/systemd/run-tmpfiles.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ d /run/cache 0755 root root -
d /run/lib 0755 root root -
d /run/log 0755 root root -
d /run/spool 0755 root root -
d /run/lock 0700 root root -

d /run/cache/private 0700 root root -
d /run/lib/private 0700 root root -
Expand Down
Loading