Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c47ffaa
Added github action to build on centos8 runner.
soenkeliebau Feb 19, 2021
9e625d1
Renamed workflow
soenkeliebau Feb 19, 2021
9c42bb1
Enabled manually triggering nightly job
soenkeliebau Feb 20, 2021
5b029c0
First try of building rpm
soenkeliebau Feb 20, 2021
8a77971
Removed running tests for now
soenkeliebau Feb 20, 2021
e6bce59
Fixed path to rpm Spec
soenkeliebau Feb 20, 2021
bbad39b
Added pwd to prefix topdir with buildtarget directory
soenkeliebau Feb 20, 2021
623cb61
Path stuff
soenkeliebau Feb 20, 2021
fd8a192
More path stuff
soenkeliebau Feb 20, 2021
3cd37b0
Hopefully fixed some stuff..
soenkeliebau Feb 21, 2021
495f198
Forgot to check in half the files..
soenkeliebau Feb 21, 2021
9a8bbd4
Hard coded service name
soenkeliebau Feb 21, 2021
5683f0f
Merge branch 'main' into rpmbuild
soenkeliebau Feb 22, 2021
1281731
Steal password..
soenkeliebau Feb 22, 2021
a4572e9
Steal password..
soenkeliebau Feb 22, 2021
66e03f4
Added Centos7 build job
soenkeliebau Feb 22, 2021
7d905e0
First try of adding deb package information
soenkeliebau Feb 23, 2021
ad6e85e
Added assets
soenkeliebau Feb 23, 2021
ea18d51
Added apt build
soenkeliebau Feb 23, 2021
8bade6a
Removed copy&paste error
soenkeliebau Feb 23, 2021
19e8fca
Changed agent config directories and added postinst script to create …
soenkeliebau Feb 24, 2021
5bdcc0b
Added DEBHELPER marker to postinst
soenkeliebau Feb 24, 2021
e2cee5e
Added config options to place certificate and key file under the agen…
soenkeliebau Feb 25, 2021
86265df
Merge branch 'main' into rpmbuild
soenkeliebau Feb 25, 2021
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
51 changes: 51 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Centos8-Nightly

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
debian10:
runs-on: debian10
steps:
- uses: actions/checkout@v2
- name: Build
run: ~/.cargo/bin/cargo +nightly build --verbose --release
- name: Build apt package
run: ~/.cargo/bin/cargo deb

centos-8:
runs-on: centos8
steps:
- uses: actions/checkout@v2
- name: Build
run: ~/.cargo/bin/cargo build --verbose --release
- name: Create RPM scaffolding
run: |
cp -r rpm target/
cp target/release/agent target/rpm/SOURCES/stackable-agent-0.1.0/opt/stackable-agent
find target/rpm/SOURCES/ -name ".gitkeep" -type f -delete
cd target/rpm/SOURCES && tar czvf stackable-agent-0.1.0.tar.gz stackable-agent-0.1.0
- name: Build RPM
run: /usr/bin/rpmbuild --define "_topdir `pwd`/target/rpm" -v -ba target/rpm/SPECS/stackable-agent-0.1.0.spec

centos-7:
runs-on: centos7
steps:
- uses: actions/checkout@v2
- name: Build
run: ~/.cargo/bin/cargo build --verbose --release
- name: Create RPM scaffolding
run: |
cp -r rpm target/
cp target/release/agent target/rpm/SOURCES/stackable-agent-0.1.0/opt/stackable-agent
find target/rpm/SOURCES/ -name ".gitkeep" -type f -delete
cd target/rpm/SOURCES && tar czvf stackable-agent-0.1.0.tar.gz stackable-agent-0.1.0
- name: Build RPM
run: /usr/bin/rpmbuild --define "_topdir `pwd`/target/rpm" -v -ba target/rpm/SPECS/stackable-agent-0.1.0.spec
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stackable-agent"
version = "0.1.0"
version = "0.1.0-nightly"
authors = ["Sönke Liebau <soenke.liebau@stackable.de>"]
edition = "2018"

Expand Down Expand Up @@ -46,3 +46,11 @@ serde_yaml = "0.8"
opt-level = "s"
lto = true
codegen-units = 1

[package.metadata.deb]
maintainer-scripts = "debian/"
systemd-units = { enable = false }
assets = [
["rpm/SOURCES/stackable-agent-0.1.0/etc/stackable-agent/agent.conf", "etc/stackable-agent/", "644"],
["target/release/agent", "opt/stackable-agent/stackable-agent", "755"],
]
7 changes: 7 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

mkdir -p /var/lib/stackable/packages
mkdir -p /var/lib/stackable/config
mkdir -p /var/lib/stackable/agentdata/config

#DEBHELPER#
14 changes: 14 additions & 0 deletions debian/service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Stackable Agent
Before=
After=network.target
[Service]
User=root
ExecStart=/opt/stackable-agent/stackable-agent
Restart=on-abort
StandardOutput=journal
StandardError=journal
Environment="CONFIG_FILE=/etc/stackable-agent/agent.conf"
Environment="RUST_LOG=info,stackable_agent::provider::states=debug,stackable_agent::agentconfig=trace"
[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--package-directory=/var/lib/stackable/packages
--config-directory=/var/lib/stackable/config
--data-directory=/var/lib/stackable/agentdata
--server-key-file=/var/lib/stackable/agentdata/config/agent.key
--server-cert-file=/var/lib/stackable/agentdata/config/agent.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Stackable Agent
Before=
After=network.target
[Service]
User=root
ExecStart=/opt/stackable-agent/stackable-agent
Restart=on-abort
StandardOutput=journal
StandardError=journal
Environment="CONFIG_FILE=/etc/stackable-agent/agent.conf"
Environment="RUST_LOG=info,stackable_agent::provider::states=debug,stackable_agent::agentconfig=trace"
[Install]
WantedBy=multi-user.target
36 changes: 36 additions & 0 deletions rpm/SPECS/stackable-agent-0.1.0.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
%define debug_package %{nil}
BuildRequires: systemd-rpm-macros


Name: stackable-agent
Version: 0.1.0
Release: 1%{?dist}
Summary: Binarius package

Group: System Environment/Base
License: GPLv3+
Source0: stackable-agent-0.1.0.tar.gz

%description
Testing package.

%prep
%setup -q #unpack tarball

%build

%install
cp -rfa * %{buildroot}

%post
%systemd_post stackable-agent.service
/usr/bin/systemctl daemon-reload


%files
/opt/stackable-agent/agent
/etc/stackable-agent/agent.conf
/etc/systemd/system/stackable-agent.service
%dir /var/lib/stackable/data
%dir /var/lib/stackable/config
%dir /var/lib/stackable/packages