Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Add building of RPMs and update default paths for DEB packages and command line parameters #110

Merged
merged 22 commits into from
Apr 1, 2021

Conversation

soenkeliebau
Copy link
Member

@soenkeliebau soenkeliebau commented Mar 11, 2021

This PR makes a number of changes to the agent for both RPM and DEB packages, as well as default values for command line options.

I would have liked to split this into separate PRs, but as all these things are tied together there was no clean way of separating this, so I decided to bunch everything together.

Agent Code:
In line with ADR011 default value for the following parameters was changed (old value in [] for reference).

  • data-directory: /var/lib/stackable/agent [/var/stackable/agent/data]
  • bootstrap-file: /etc/stackable/stackable-agent/bootstrap-kubelet.conf [/etc/kubernetes/bootstrap-kubelet.conf]
  • server-cert-file: /etc/stackable/stackable-agent/secret/agent.crt [None]
  • server-key-file: /etc/stackable/stackable-agent/secret/agent.key [None]
  • config-directory: /etc/stackable/serviceconfig [/opt/stackable/config]
  • log-directory: /var/log/stackable/servicelogs [/opt/stackable/logs]

RPM:
Converted build process from operators to build agent rpm.

DEB:
Changed paths to be in line with the new defaults specified above.

Both packages currently do not deliver a config file, as they run completely of the default values. We should look into packaging a template config perhaps.

I am not entirely happy with the current directory structure for packaging, as we have some duplication in here, but I think it will serve for now and is not worth the effort needed to make it nicer (which would also make it more complex).

Also, changes to paths which files are installed into currently require a bit of digging and changes in multiple files - again, this is not nice, but I'm not sure it is worth the effort of making it nicer.

I've created issue #108 with some open questions that do not necessarily need to be included in this PR but should be addressed at some point.

@soenkeliebau soenkeliebau requested a review from a team March 11, 2021 13:42
@backstreetkiwi
Copy link
Member

My review applies not to the way the packages are built here. Instead, as a user of the built artifacts I can say that the CentOS packages that are built by the action in this branch work in my tests with cluster generation in T2.

backstreetkiwi
backstreetkiwi previously approved these changes Mar 12, 2021
@siegfriedweber
Copy link
Member

The paths described in the documentation do not match with the ones configured in the rpm.

@soenkeliebau soenkeliebau self-assigned this Mar 16, 2021
@lfrancke lfrancke added the type/enhancement New feature or request label Mar 16, 2021
@lfrancke lfrancke linked an issue Mar 16, 2021 that may be closed by this pull request
# Conflicts:
#	Cargo.toml
Also changed default paths for a lot of agent directories - this definitely needs calling out in the commit message!

Config file is now empty, as all settings are used with their default values.
@soenkeliebau soenkeliebau changed the title Add building and publishing of rpms on push to main branch Add building of RPMs and update default paths for DEB packages and command line parameters Mar 30, 2021
Copy link
Member

@lfrancke lfrancke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I have found issues but I'm not 100% sure. Please double check.

packaging/buildrpm.sh Outdated Show resolved Hide resolved
Restart=on-abort
StandardOutput=journal
StandardError=journal
Environment="CONFIG_FILE=/etc/stackable-agent/agent.conf"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File is obsolete.

%define __os_install_post %{_dbpath}/brp-compress
%define debug_package %{nil}
%define _bindir /opt/stackable-agent
%define _confdir /etc/stackable-agent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are both of these correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire file is not needed anymore, I simply forgot to include deletion of the now unused .rpm folder in my commit.

@@ -0,0 +1,62 @@
%define __spec_install_post %{nil}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are two stackable-agent.spec files. Which one is correct or are they both used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the incorrect one.

Copy link
Member

@lfrancke lfrancke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous review

@soenkeliebau
Copy link
Member Author

soenkeliebau commented Apr 1, 2021

I have addressed the comments from Lars.
The build process will not be run because I have not added this branch to the workflow. No material changes were made to it though, I wouldn't expect it to break. Let me know if I should make it run before merging.

The paths described in the documentation do not match with the ones configured in the rpm.

I'm not entirely sure if this comment still needs addressing after all the path changes I included in this PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build and publish RPM packages
4 participants