-
Notifications
You must be signed in to change notification settings - Fork 60
on-prem: cloud provider config modal (COMPOSER-2488) #3103
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
base: main
Are you sure you want to change the base?
Conversation
06d6e30
to
8affe64
Compare
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #3103 +/- ##
==========================================
- Coverage 84.69% 83.67% -1.03%
==========================================
Files 187 190 +3
Lines 23417 23712 +295
Branches 2416 2420 +4
==========================================
+ Hits 19833 19840 +7
- Misses 3567 3852 +285
- Partials 17 20 +3
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
b540c5b
to
11f0e9f
Compare
fae04a1
to
33544e8
Compare
Last step remaining is to restart the worker and then this is ready. |
ece3737
to
c1de9c7
Compare
export type AWSWorkerConfig = | ||
| { | ||
bucket?: string | undefined; | ||
region?: string | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The region isn't actually used at all by the osbuild-worker, but it makes sense to save this info here for the on-prem version
c1de9c7
to
5d5963c
Compare
Error | ||
</Title> | ||
<EmptyStateBody> | ||
There was an error reading the `/etc/osbuild-worker/osbuild-worker.toml` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the copy here could be improved, any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's sort out copy later.
I added a note to the the guides about configuring the worker globally for AWS uploads, since this PR essentially follows that pattern. |
422fca4
to
5dadefc
Compare
await cockpit.spawn(['systemctl', 'stop', 'osbuild-*'], { | ||
superuser: 'require', | ||
}); | ||
|
||
await cockpit.spawn( | ||
[ | ||
'systemctl', | ||
'start', | ||
'osbuild-composer.socket', | ||
'osbuild-composer', | ||
], | ||
{ | ||
superuser: 'require', | ||
} | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code stops all osbuild services with osbuild-*
but only explicitly starts osbuild-composer.socket
and osbuild-composer
. Since this PR is configuring the osbuild-worker, it should also explicitly start the osbuild-worker
service to ensure it picks up the new configuration. Consider adding it to the services being started.
await cockpit.spawn(['systemctl', 'stop', 'osbuild-*'], { | |
superuser: 'require', | |
}); | |
await cockpit.spawn( | |
[ | |
'systemctl', | |
'start', | |
'osbuild-composer.socket', | |
'osbuild-composer', | |
], | |
{ | |
superuser: 'require', | |
} | |
); | |
await cockpit.spawn(['systemctl', 'stop', 'osbuild-*'], { | |
superuser: 'require', | |
}); | |
await cockpit.spawn( | |
[ | |
'systemctl', | |
'start', | |
'osbuild-composer.socket', | |
'osbuild-composer', | |
'osbuild-worker', | |
], | |
{ | |
superuser: 'require', | |
} | |
); |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on the fence about this. We do sort of need to restart the osbuild-local-worker.socket
but this is taken care of by restarting the service and the osbuild-composer.socket
. @croissanne do you have any opinions on this?
48da3b7
to
4e3565a
Compare
Analytics was enabled for on-prem which broke the images table. This commit disables the analytics for the on-prem frontend.
A select box with dropdown options makes more sense for the AWS region from a UX point of view.
This simplifies the validation and will make it easier to validate the whole form later on.
Setup the footer for the AWS config step.
Create a few types to help stick to conventions and tidy up the code.
Add a query to load the `/etc/osbuild-worker/osbuild-worker.toml` config and use this to set the state of the `cloudConfig` store slice.
Add an error component to improve the UI when there is an issue reading the `osbuild-worker.toml` file.
This is still a wip since the form fields aren't yet disabled when the config toggle is set to off.
Create the `osbuild-worker.toml` file if it doesn't exist already.
Add the `modify` file function which performs atomic modifications to a file.
Add an endpoint to update the worker config.
Save the AWS config modifications to the `osbuild-worker.toml` file.
Restart osbuild-composer and the worker after updating the config, this is a necessary step for osbuild-composer to register the changes.
4e3565a
to
2954939
Compare
Add a modal/page to configure the
osbuild-worker
with the required configs for the various cloud providersJIRA: COMPOSER-2488