From f79c23f77427d390f1524df5839b8a91a3a4f9b4 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 19:39:08 -0500 Subject: [PATCH 01/12] Fix asset upload on release --- .github/workflows/release_created.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index ee53b13..3778239 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -53,11 +53,11 @@ jobs: runs-on: ubuntu-latest needs: [pyinstaller-build] steps: - - name: Checkout code - uses: actions/checkout@v2 - uses: actions/download-artifact@v3 + - name: Display structure of downloaded files + run: ls -alR - name: Zip MacOS output - run: zip -r9 RBSAgent.app RBSAgent.app/RBSAgent.app + run: cd RBSAgent.app && mv RBSAgent.app RBSAgent zip -r9 RBSAgent RBSAgent.app && cd .. - name: Display structure of downloaded files run: ls -alR - name: Upload Release Asset Windows From 64635deeb380b1cb1dbb6ce86735c2870c6230eb Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 19:41:49 -0500 Subject: [PATCH 02/12] Fix asset upload on release --- .github/workflows/release_created.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index 3778239..f653c2f 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -57,7 +57,7 @@ jobs: - name: Display structure of downloaded files run: ls -alR - name: Zip MacOS output - run: cd RBSAgent.app && mv RBSAgent.app RBSAgent zip -r9 RBSAgent RBSAgent.app && cd .. + run: cd RBSAgent.app && mv RBSAgent.app RBSAgent && zip -r9 RBSAgent RBSAgent.app && cd .. - name: Display structure of downloaded files run: ls -alR - name: Upload Release Asset Windows From debdb864c7fd767483aa7d0187abaf904c9db524 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 19:45:19 -0500 Subject: [PATCH 03/12] Fix asset upload on release --- .github/workflows/release_created.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index f653c2f..e94f231 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -57,7 +57,7 @@ jobs: - name: Display structure of downloaded files run: ls -alR - name: Zip MacOS output - run: cd RBSAgent.app && mv RBSAgent.app RBSAgent && zip -r9 RBSAgent RBSAgent.app && cd .. + run: mv RBSAgent.app RBSAgent && zip -r9 RBSAgent RBSAgent.app - name: Display structure of downloaded files run: ls -alR - name: Upload Release Asset Windows From 2552b52e0d678c0c3d912d10f830d6faf41e78c9 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 19:49:11 -0500 Subject: [PATCH 04/12] Fix asset upload on release --- .github/workflows/release_created.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index e94f231..82237de 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -57,7 +57,7 @@ jobs: - name: Display structure of downloaded files run: ls -alR - name: Zip MacOS output - run: mv RBSAgent.app RBSAgent && zip -r9 RBSAgent RBSAgent.app + run: zip -r9 RBSAgent.app - name: Display structure of downloaded files run: ls -alR - name: Upload Release Asset Windows From cbababe8c141c8368335fa3355914b3b48eb3d94 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 19:57:15 -0500 Subject: [PATCH 05/12] Fix asset upload on release --- .github/workflows/release_created.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index 82237de..88f876d 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -57,7 +57,7 @@ jobs: - name: Display structure of downloaded files run: ls -alR - name: Zip MacOS output - run: zip -r9 RBSAgent.app + run: zip -r9 RBSAgent RBSAgent.app/ - name: Display structure of downloaded files run: ls -alR - name: Upload Release Asset Windows From 3684125879b4c69ae4d504e62b855f24b8cdfcea Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 20:08:14 -0500 Subject: [PATCH 06/12] Fix asset upload on release --- .github/workflows/release_created.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index 88f876d..d5622a4 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -50,6 +50,7 @@ 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: @@ -57,7 +58,7 @@ jobs: - name: Display structure of downloaded files run: ls -alR - name: Zip MacOS output - run: zip -r9 RBSAgent RBSAgent.app/ + run: zip -r9 RBSAgent RBSAgent.app/ && mv RBSAgent.zip RBSAgent.app.zip - name: Display structure of downloaded files run: ls -alR - name: Upload Release Asset Windows From 225c1a5d3c8d61e5c83aefbcbd64b944ac6dffdc Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 20:19:01 -0500 Subject: [PATCH 07/12] Fix asset upload on release --- .github/workflows/release_created.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index d5622a4..aa57b63 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -61,6 +61,12 @@ jobs: run: zip -r9 RBSAgent RBSAgent.app/ && mv RBSAgent.zip RBSAgent.app.zip - name: Display structure of downloaded files run: ls -alR + - uses: shogo82148/actions-upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./*RBSAgent* + overwrite: true + - name: Upload Release Asset Windows uses: actions/upload-release-asset@v1.0.1 env: From 8cb199ad6fa8f7054200a6d9e5efd348de124da9 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 20:25:36 -0500 Subject: [PATCH 08/12] Fix asset upload on release --- .github/workflows/release_created.yml | 83 ++++++++++++++------------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index aa57b63..7675a65 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -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 @@ -57,40 +57,45 @@ jobs: - uses: actions/download-artifact@v3 - name: Display structure of downloaded files run: ls -alR - - name: Zip MacOS output - run: zip -r9 RBSAgent RBSAgent.app/ && mv RBSAgent.zip RBSAgent.app.zip - - name: Display structure of downloaded files - run: ls -alR - - uses: shogo82148/actions-upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./*RBSAgent* - overwrite: true + # - name: Zip MacOS output + # run: | + # zip -r9 RBSAgent RBSAgent.app/ + # mv RBSAgent.zip RBSAgent.app.zip + # mv ./RBSAgent.exe/RBSAgent.exe ./ + + # - name: Display structure of downloaded files + # run: ls -alR - - name: Upload Release Asset Windows - uses: actions/upload-release-asset@v1.0.1 - 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/upload-release-asset@v1.0.1 - 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/upload-release-asset@v1.0.1 - 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.app.zip - asset_name: RBSAgent - asset_content_type: application/zip \ No newline at end of file + # - uses: shogo82148/actions-upload-release-asset@v1 + # with: + # upload_url: ${{ github.event.release.upload_url }} + # asset_path: ./RBSAgent* + # overwrite: true + + # - name: Upload Release Asset Windows + # uses: actions/upload-release-asset@v1.0.1 + # 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/upload-release-asset@v1.0.1 + # 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/upload-release-asset@v1.0.1 + # 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.app.zip + # asset_name: RBSAgent + # asset_content_type: application/zip \ No newline at end of file From 8451908957509ef2823f6c241ee35437f3cca62b Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 20:30:57 -0500 Subject: [PATCH 09/12] Fix asset upload on release --- .github/workflows/release_created.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index 7675a65..e85aec6 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -55,6 +55,10 @@ jobs: needs: [pyinstaller-build] steps: - uses: actions/download-artifact@v3 + - name: Display structure of downloaded files + run: ls -alR + - name: Zip MacOS Build + run: cd RBSAgent-mac && zip -r9 RBSAgent RBSAgent.app - name: Display structure of downloaded files run: ls -alR # - name: Zip MacOS output @@ -66,11 +70,11 @@ jobs: # - name: Display structure of downloaded files # run: ls -alR - # - uses: shogo82148/actions-upload-release-asset@v1 - # with: - # upload_url: ${{ github.event.release.upload_url }} - # asset_path: ./RBSAgent* - # overwrite: true + - uses: shogo82148/actions-upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./RBSAgent.* + overwrite: true # - name: Upload Release Asset Windows # uses: actions/upload-release-asset@v1.0.1 From 243d9c49fb636cad06b06631588cb6a10ea40b53 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 20:39:30 -0500 Subject: [PATCH 10/12] Fix asset upload on release --- .github/workflows/release_created.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index e85aec6..874a1de 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -59,21 +59,17 @@ jobs: run: ls -alR - name: Zip MacOS Build run: cd RBSAgent-mac && zip -r9 RBSAgent RBSAgent.app - - name: Display structure of downloaded files - run: ls -alR - # - name: Zip MacOS output - # run: | - # zip -r9 RBSAgent RBSAgent.app/ - # mv RBSAgent.zip RBSAgent.app.zip - # mv ./RBSAgent.exe/RBSAgent.exe ./ - - # - name: Display structure of downloaded files - # run: ls -alR + - 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 }} - asset_path: ./RBSAgent.* + asset_path: ./RBSAgent* overwrite: true # - name: Upload Release Asset Windows From 05084a16f8f370b5600d9bf60a2a5a04a3d86fb6 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 20:57:35 -0500 Subject: [PATCH 11/12] Update Readme with binary install notes --- README.md | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 38a9abd..0ff740a 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 \ @@ -96,6 +102,39 @@ 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: @@ -103,7 +142,12 @@ 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. From 6e68550d6c34347f629333c188c2f6f29c59b7b7 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 20:58:54 -0500 Subject: [PATCH 12/12] remove commented code in workflow --- .github/workflows/release_created.yml | 30 +-------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index 874a1de..2f22340 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -70,32 +70,4 @@ jobs: with: upload_url: ${{ github.event.release.upload_url }} asset_path: ./RBSAgent* - overwrite: true - - # - name: Upload Release Asset Windows - # uses: actions/upload-release-asset@v1.0.1 - # 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/upload-release-asset@v1.0.1 - # 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/upload-release-asset@v1.0.1 - # 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.app.zip - # asset_name: RBSAgent - # asset_content_type: application/zip \ No newline at end of file + overwrite: true \ No newline at end of file