From a270a50126fe714aaf3d54bb94e2fabf3995ffe6 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 16:51:20 -0500 Subject: [PATCH 1/5] Build Agent Binaries and update docs --- .github/workflows/staging_push.yml | 19 ++++++++++++++++++- README.md | 4 ++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/staging_push.yml b/.github/workflows/staging_push.yml index 218b298..d7b0f06 100644 --- a/.github/workflows/staging_push.yml +++ b/.github/workflows/staging_push.yml @@ -26,4 +26,21 @@ jobs: uses: docker/build-push-action@v5 with: push: true - tags: runbooksolutions/agent:dev \ No newline at end of file + tags: runbooksolutions/agent:dev + pyinstaller-build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build and Publish Executable + uses: sayyid5416/pyinstaller@v1 + with: + python_ver: '3.8' # Adjust the Python version as needed + spec: 'app.py' # Adjust the path to your .spec or .py file + requirements: 'requirements.txt' # Adjust the path to your requirements.txt file + upload_exe_with_name: 'RBSAgent' # Adjust the desired artifact name + options: --onefile, --name "RBSAgent", --windowed \ No newline at end of file diff --git a/README.md b/README.md index aab0731..38a9abd 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,10 @@ For those implementing a custom backend for the Agent, it's crucial to provide t Understanding these API requests empowers users to integrate the RunbookSolution Agent seamlessly into their infrastructure or develop custom functionalities, enhancing the overall capabilities of the system. +For additional information about the expected responses refer to the [Expected Server Responses](docs/Responses.md) page. + +> Note: A Proof-of-Concept backend is available in the [agent_backend](https://github.com/RunbookSolutions/agent_backend) repository. + ## Additional Notes ### Creating a Keytab File From 65ee15e575b45669c488ae6476263a97d4e36904 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 16:56:26 -0500 Subject: [PATCH 2/5] Update workflow for binary build --- .github/workflows/staging_push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging_push.yml b/.github/workflows/staging_push.yml index d7b0f06..3e837de 100644 --- a/.github/workflows/staging_push.yml +++ b/.github/workflows/staging_push.yml @@ -39,7 +39,7 @@ jobs: - name: Build and Publish Executable uses: sayyid5416/pyinstaller@v1 with: - python_ver: '3.8' # Adjust the Python version as needed + python_ver: '3.9' # Adjust the Python version as needed spec: 'app.py' # Adjust the path to your .spec or .py file requirements: 'requirements.txt' # Adjust the path to your requirements.txt file upload_exe_with_name: 'RBSAgent' # Adjust the desired artifact name From 254818dd5312410b011d3b51bdf3d9dfd9bbd539 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 17:02:57 -0500 Subject: [PATCH 3/5] Update workflow for binary build --- .github/workflows/staging_push.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/staging_push.yml b/.github/workflows/staging_push.yml index 3e837de..ed64b54 100644 --- a/.github/workflows/staging_push.yml +++ b/.github/workflows/staging_push.yml @@ -31,7 +31,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + include: + - os: windows-latest + output: RBSAgent.exe + - os: ubuntu-latest + output: RBSAgent + - os: macos-latest + output: RBSAgent.app steps: - name: Checkout code uses: actions/checkout@v2 From ee58b1a5b6b728ba6b61bb23cb788e6dbfe60301 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 17:04:24 -0500 Subject: [PATCH 4/5] Update workflow for binary build --- .github/workflows/staging_push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging_push.yml b/.github/workflows/staging_push.yml index ed64b54..450d943 100644 --- a/.github/workflows/staging_push.yml +++ b/.github/workflows/staging_push.yml @@ -48,5 +48,5 @@ jobs: python_ver: '3.9' # Adjust the Python version as needed spec: 'app.py' # Adjust the path to your .spec or .py file requirements: 'requirements.txt' # Adjust the path to your requirements.txt file - upload_exe_with_name: 'RBSAgent' # Adjust the desired artifact name + upload_exe_with_name: ${{matrix.output}} # Adjust the desired artifact name options: --onefile, --name "RBSAgent", --windowed \ No newline at end of file From 7c468f3fd13b3bdeb69a0f400c6497da484c7d35 Mon Sep 17 00:00:00 2001 From: Will G Date: Mon, 27 Nov 2023 18:41:38 -0500 Subject: [PATCH 5/5] Update workflow for binary build on release --- .github/workflows/release_created.yml | 58 +++++++++++++++++++++++++++ .github/workflows/staging_push.yml | 25 +----------- .gitignore | 5 ++- 3 files changed, 63 insertions(+), 25 deletions(-) diff --git a/.github/workflows/release_created.yml b/.github/workflows/release_created.yml index 13ccdc2..b9949b8 100644 --- a/.github/workflows/release_created.yml +++ b/.github/workflows/release_created.yml @@ -27,3 +27,61 @@ jobs: with: push: true tags: runbooksolutions/agent:latest, runbooksolutions/agent:${{ github.event.release.tag_name }} + pyinstaller-build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: windows-latest + output: RBSAgent.exe + - os: ubuntu-latest + output: RBSAgent + - os: macos-latest + output: RBSAgent.app + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Build and Publish Executable + uses: sayyid5416/pyinstaller@v1 + with: + python_ver: '3.9' # Adjust the Python version as needed + spec: 'app.py' # Adjust the path to your .spec or .py file + requirements: 'requirements.txt' # Adjust the path to your requirements.txt file + upload_exe_with_name: ${{matrix.output}} # Adjust the desired artifact name + options: --onefile, --name "RBSAgent", --windowed + upload-release-assets: + runs-on: ubuntu-latest + needs: [pyinstaller-build] + steps: + - name: Checkout code + uses: actions/checkout@v2 + - uses: actions/download-artifact@v3 + with: + path: ./dist + - 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: ./dist + asset_name: RBSAgent.exe + asset_content_type: application/x-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: ./dist + asset_name: RBSAgent + asset_content_type: application/x-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: ./dist + asset_name: RBSAgent + asset_content_type: application/x-executable \ No newline at end of file diff --git a/.github/workflows/staging_push.yml b/.github/workflows/staging_push.yml index 450d943..218b298 100644 --- a/.github/workflows/staging_push.yml +++ b/.github/workflows/staging_push.yml @@ -26,27 +26,4 @@ jobs: uses: docker/build-push-action@v5 with: push: true - tags: runbooksolutions/agent:dev - pyinstaller-build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: windows-latest - output: RBSAgent.exe - - os: ubuntu-latest - output: RBSAgent - - os: macos-latest - output: RBSAgent.app - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Build and Publish Executable - uses: sayyid5416/pyinstaller@v1 - with: - python_ver: '3.9' # Adjust the Python version as needed - spec: 'app.py' # Adjust the path to your .spec or .py file - requirements: 'requirements.txt' # Adjust the path to your requirements.txt file - upload_exe_with_name: ${{matrix.output}} # Adjust the desired artifact name - options: --onefile, --name "RBSAgent", --windowed \ No newline at end of file + tags: runbooksolutions/agent:dev \ No newline at end of file diff --git a/.gitignore b/.gitignore index 92d77a0..46f483e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,7 @@ run OLD hosts test.py -__pycache__ \ No newline at end of file +__pycache__ +app.spec +build +dist \ No newline at end of file