Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from RunbookSolutions/staging
Browse files Browse the repository at this point in the history
Finished binary compile and release upload
  • Loading branch information
sniper7kills authored Nov 28, 2023
2 parents 7a1a66c + 6e68550 commit 4fc16a5
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 34 deletions.
50 changes: 17 additions & 33 deletions .github/workflows/release_created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
matrix:
include:
- os: windows-latest
output: RBSAgent.exe
output: RBSAgent-windows
- os: ubuntu-latest
output: RBSAgent
output: RBSAgent-linux
- os: macos-latest
output: RBSAgent.app
output: RBSAgent-mac
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -50,40 +50,24 @@ jobs:
upload_exe_with_name: ${{matrix.output}} # Adjust the desired artifact name
options: --onefile, --name "RBSAgent", --windowed
upload-release-assets:
permissions: write-all
runs-on: ubuntu-latest
needs: [pyinstaller-build]
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/download-artifact@v3
- name: Zip MacOS output
run: zip -r9 RBSAgent.app RBSAgent.app/RBSAgent.app
- name: Display structure of downloaded files
run: ls -alR
- name: Upload Release Asset Windows
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./RBSAgent.exe/RBSAgent.exe
asset_name: RBSAgent.exe
asset_content_type: application/vnd.microsoft.portable-executable
- name: Upload Release Asset Linux
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./RBSAgent/RBSAgent
asset_name: RBSAgent
asset_content_type: application/x-executable
- name: Upload Release Asset Mac
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Zip MacOS Build
run: cd RBSAgent-mac && zip -r9 RBSAgent RBSAgent.app
- name: Move linux files
run: |
mv RBSAgent-linux/RBSAgent RBSAgent
mv RBSAgent-mac/RBSAgent.zip RBSAgent.app.zip
mv RBSAgent-windows/RBSAgent.exe RBSAgent.exe
rm -rf RBSAgent-*
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./RBSAgent.app.zip
asset_name: RBSAgent
asset_content_type: application/zip
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./RBSAgent*
overwrite: true
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This codebase comprises the core of the Agent for RunbookSolutions.
- [Installation](#installation)
- [Prebuilt Docker Image](#prebuilt-docker-image)
- [Extending the Default Image](#extending-the-default-image)
- [From Binary](#from-binary)
- [From Source](#from-source)
- [Configuration](#configuration)
- [`config.ini` Parameters](#configini-parameters)
Expand Down Expand Up @@ -84,6 +85,11 @@ Build and run the customized Docker image:
```sh
docker build . --tag YOUR_NAME_OR_COMPANY/agent:latest

# Create necessary directories
mkdir agent
cd agent
mkdir plugins stores kerberos
wget https://raw.githubusercontent.com/RunbookSolutions/agent/production/config.ini
docker run \
--name RunbookSolutions_Agent \
-v $(pwd)/config.ini:/app/config.ini \
Expand All @@ -96,14 +102,52 @@ docker run \
YOUR_NAME_OR_COMPANY/agent:latest
```

### From Binary
If you prefer a simpler installation process than Docker, you can use the binary distribution of the Runbook Solutions Agent. Below are the steps for installation on Linux, but you can adapt the procedure for either Linux or macOS.

Binary Links:
- **Linux**: `https://github.com/RunbookSolutions/agent/releases/latest/RBSAgent`
- **Windows**: `https://github.com/RunbookSolutions/agent/releases/latest/RBSAgent.exe`
- **Mac**: `https://github.com/RunbookSolutions/agent/releases/latest/RBSAgent.app.zip`

1) CreateNecessary Directories
```sh
# Create the necessary directories
mkdir agent
cd agent
mkdir plugins stores kerberos
```
1) Download Configuration File
```sh
# Download the default configuration file
wget https://raw.githubusercontent.com/RunbookSolutions/agent/production/config.ini
```
1) Download and run the binary (linux)
```sh
# Download the Runbook Solutions Agent binary for Linux
wget https://github.com/RunbookSolutions/agent/releases/latest/RBSAgent
# Make the binary executable
chmod +x ./RBSAgent
# Run the agent
./RBSAgent
```

> **Note:** The mac client has not been thoroughly tested. Use it at your discretion, and consider checking for updates or community feedback on its compatibility and stability.

### From Source
If you prefer building from the source code, execute the following commands:

```sh
git clone https://github.com/RunbookSolutions/agent.git
cd agent
./run
pip install -r requirements.txt
python app.py
# Package
pip install pyinstaller
pyinstaller --one-file app.py
```

Ensure you have the necessary dependencies installed before running the build.
Expand Down

0 comments on commit 4fc16a5

Please sign in to comment.