Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[agent ]Issue/1860 windows install script #58

Merged
merged 35 commits into from
Mar 10, 2025

Conversation

heditar
Copy link
Contributor

@heditar heditar commented Feb 27, 2025

Proposed changes

  • adding 2 install scripts (nsi+ps1) for Windows service user and session, the upgrade scipts will come in a next PR

For testing the service user:

  • compile the installer makensis agent-installer-service-user.nsi
  • you can test just the exe by running .\agent-installer-service-user.exe /S ~USER=[username with domain] ~PASSWORD=[password] ~OPENBAS_URL="http://localhost:3001" ~ACCESS_TOKEN="5ccddea0-613c-4a91-a602-6a4eb243d21c" ~UNSECURED_CERTIFICATE=false ~WITH_PROXY=false
  • you can test the powershell script by opening the script and replacing ${OPENBAS_URL}/${OPENBAS_TOKEN}/${OPENBAS_TOKEN}/${OPENBAS_UNSECURED_CERTIFICATE}/${OPENBAS_WITH_PROXY} and running powershell agent-installer-service-user.ps1 -User [username with domain] -Password [password]

For testing the session:

  • compile the installer makensis agent-installer-session-user.nsi
  • you can test just the exe by running .\agent-installer-session-user.exe /S ~OPENBAS_URL="http://localhost:3001" ~ACCESS_TOKEN="5ccddea0-613c-4a91-a602-6a4eb243d21c" ~UNSECURED_CERTIFICATE=false ~WITH_PROXY=false WITH_ADMIN_PRIVILEGE=[true or false]
    • you can test the powershell script by opening the script and replacing ${OPENBAS_URL}/${OPENBAS_TOKEN}/${OPENBAS_TOKEN}/${OPENBAS_UNSECURED_CERTIFICATE}/${OPENBAS_WITH_PROXY} and running powershell agent-installer-session-user.ps1 [-WithAdminPrivilege]

Related issues

  • #1860

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion) -> will be added separately
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@heditar heditar requested a review from damgouj February 27, 2025 18:29
Copy link
Member

@damgouj damgouj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First review, need to test the session install and the 2 upgrades

@heditar heditar force-pushed the issue/1860-win-install-script branch from 7a14951 to cf315c1 Compare March 7, 2025 08:36
Copy link
Member

@damgouj damgouj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about creating a README on the installer folder and writing that if we update a script, don't forget to update all other scripts ?

Sorry, some tests aren't OK :/

Copy link
Member

@damgouj damgouj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested OK :)

@heditar heditar merged commit 2aac479 into release/current Mar 10, 2025
6 checks passed
@heditar heditar deleted the issue/1860-win-install-script branch March 10, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants