diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index ee53b13..2f22340 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 @@ -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/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 }} + - 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 \ No newline at end of file + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./RBSAgent* + overwrite: true \ No newline at end of file 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.