Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Move device-scanner into the IML repo (#2009)
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Grund <jgrund@whamcloud.io>
  • Loading branch information
jgrund authored Jun 29, 2020
1 parent 21d4a86 commit 00356a3
Show file tree
Hide file tree
Showing 72 changed files with 5,896 additions and 2 deletions.
29 changes: 28 additions & 1 deletion .copr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,31 @@ iml-gui-srpm:
rpmbuild -bs -D "_topdir ${TMPDIR}/_topdir" ${TMPDIR}/_topdir/SPECS/rust-iml-gui.spec

cp -rf ${TMPDIR}/_topdir ${BUILDROOT}/
cp -f ${TMPDIR}/_topdir/SRPMS/*.rpm $(outdir)
cp -f ${TMPDIR}/_topdir/SRPMS/*.rpm $(outdir)

device-scanner-srpm:
mkdir -p ${TMPDIR}/_topdir/{SOURCES,SPECS}

mkdir -p ${TMPDIR}/release/iml-device-scanner
rm -rf ${BUILDROOT}/_topdir

cd device-scanner; \
cargo build --release; \
cp {device-scanner-daemon,mount-emitter,zed-enhancer}/systemd-units/* \
{zed-enhancer,uevent-listener}/udev-rules/* \
target/release/device-scanner-daemon \
target/release/{history_event,pool_create,pool_destroy,pool_export,pool_import,vdev_add}-scanner \
target/release/mount-emitter \
target/release/uevent-listener \
target/release/zed-enhancer \
${TMPDIR}/release/iml-device-scanner


tar -czvf ${TMPDIR}/_topdir/SOURCES/iml-device-scanner.tar.gz -C ${TMPDIR}/release/iml-device-scanner .
cp device-scanner/iml-device-scanner.spec ${TMPDIR}/_topdir/SPECS/

rpmbuild -bs -D "_topdir ${TMPDIR}/_topdir" ${TMPDIR}/_topdir/SPECS/iml-device-scanner.spec

cp -rf ${TMPDIR}/_topdir ${BUILDROOT}/
cp -f ${TMPDIR}/_topdir/SRPMS/*.rpm $(outdir)
rm -rf ${TMPDIR}
5 changes: 5 additions & 0 deletions .github/actions/copr-zfs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: copr zfs
description: build in the copr-zfs image
runs:
using: "docker"
image: "docker://imlteam/copr-zfs"
21 changes: 21 additions & 0 deletions .github/workflows/devel-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,27 @@ jobs:
WORKSPACE: ${{ github.workspace }}
KEY: ${{ secrets.key }}
IV: ${{ secrets.iv }}
push_device_scanner:
name: Push to Copr devel (device-scanner)
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1

- name: Push rpm
uses: ./.github/actions/copr-zfs
env:
PROD: false
OWNER: managerforlustre
PROJECT: manager-for-lustre-devel
PACKAGE: iml-device-scanner
SPEC: device-scanner/iml-device-scanner.spec
SRPM_TASK: device-scanner-srpm
WORKSPACE: ${{ github.workspace }}
RUSTUP_TOOLCHAIN: stable-x86_64-unknown-linux-gnu
KEY: ${{ secrets.key }}
IV: ${{ secrets.iv }}

push_iml_docker:
name: Push to Copr devel (iml-docker)
runs-on: ubuntu-latest
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/device-scanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Device Scanner CI
on:
pull_request:
push:
branches:
- master

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --locked --manifest-path device-scanner/Cargo.toml --exclude zed-enhancer --all

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --locked --manifest-path device-scanner/Cargo.toml --exclude zed-enhancer --all -- -W warnings

rustfmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path device-scanner/Cargo.toml --all -- --check

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --locked --manifest-path device-scanner/Cargo.toml --exclude zed-enhancer --all

check_rpm_build:
name: Check RPM build
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1

- name: Build rpm
uses: ./.github/actions/copr-zfs
env:
SPEC: device-scanner/iml-device-scanner.spec
LOCAL_ONLY: true
SRPM_TASK: device-scanner-srpm
WORKSPACE: ${{ github.workspace }}
RUSTUP_TOOLCHAIN: stable-x86_64-unknown-linux-gnu
- name: Archive rpm
uses: actions/upload-artifact@v1
with:
name: rpm
path: _topdir/RPMS/x86_64
20 changes: 20 additions & 0 deletions .github/workflows/prod-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,26 @@ jobs:
WORKSPACE: ${{ github.workspace }}
KEY: ${{ secrets.key }}
IV: ${{ secrets.iv }}
push_device_scanner:
name: Push to Copr devel (device-scanner)
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1

- name: Push rpm
uses: ./.github/actions/copr-zfs
env:
PROD: true
OWNER: managerforlustre
PROJECT: manager-for-lustre-6.1
PACKAGE: iml-device-scanner
SPEC: device-scanner/iml-device-scanner.spec
SRPM_TASK: device-scanner-srpm
WORKSPACE: ${{ github.workspace }}
RUSTUP_TOOLCHAIN: stable-x86_64-unknown-linux-gnu
KEY: ${{ secrets.key }}
IV: ${{ secrets.iv }}
push_iml_docker:
name: Push to Copr prod (iml-docker)
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ members = [
]

exclude = [
'device-scanner',
'iml-gui/crate',
'iml-system-rpm-tests',
'iml-system-docker-tests',
'iml-system-rpm-tests',
]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

[![Build Status](https://travis-ci.com/whamcloud/integrated-manager-for-lustre.svg?branch=master)](https://travis-ci.com/whamcloud/integrated-manager-for-lustre)

![devel-release](https://github.com/whamcloud/integrated-manager-for-lustre/workflows/devel-release/badge.svg)

![iml-rust](https://github.com/whamcloud/integrated-manager-for-lustre/workflows/iml-rust/badge.svg)

![IML GUI](https://github.com/whamcloud/integrated-manager-for-lustre/workflows/IML%20GUI/badge.svg)

![Device Scanner CI](https://github.com/whamcloud/integrated-manager-for-lustre/workflows/Device%20Scanner%20CI/badge.svg)

Simple, but powerful, management tools that provide a unified, consistent view of Lustre storage systems and simplify the installation, configuration, monitoring, and overall management of Lustre.

## Docs
Expand Down
Loading

0 comments on commit 00356a3

Please sign in to comment.