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

Auto deployer for new releases #46

Closed
mfdlabs-ops opened this issue Mar 13, 2022 · 0 comments · Fixed by #48
Closed

Auto deployer for new releases #46

mfdlabs-ops opened this issue Mar 13, 2022 · 0 comments · Fixed by #48
Milestone

Comments

@mfdlabs-ops
Copy link
Contributor

So currently we have someone manually deploy files to the nodes.

We are thinking of writing dedicated software that automates this (only for machines not hooked onto our network, else we can just use ARCBD)

The app will poll this repositories releases and determine if there's a new version by reading registry key. By default it will not deploy releases marked as "pre-release", unless we put a very specifc string into the release title that overrides this (do not do this, only do this on very specific cases as it will deploy to every available node)

To do this we may also need to create a bridge tcp or udp server on the bot that can accept maintenance commands from an external source, this is so we can enable maintenance automatically before deployment. This will also kill every arbitered instance so we have enough memory to complete the deploy.

When it finds a new release, it will download the release and decompress it into the predefined path that is in it's configuration (check vault), in there it will Set-Location to the predefined path, and run the unpacker script, and then Set-Location into the newly created folder. If the settings say, it will copy the configuration files from the previous deployment and overwrite the new deployment's configuration files.

Finally it will run a script that:

  1. Kills all arbitered instances (if not killed already)
  2. Kills the currently running bot
  3. Goes into the new directory and starts the ps1 script RunService.ps1

It will then persist this version in the registry.

This auto deployer will have timespan setting that determines the polling interval.

WARNING: If we can somehow get a webhook for this that listens for changes instead of polling, do that instead.

@mfdlabs-ops mfdlabs-ops added this to the QoS overall milestone Mar 13, 2022
nikita-petko added a commit that referenced this issue Mar 21, 2022
nikita-petko added a commit that referenced this issue Mar 21, 2022
@mfdlabs-ops mfdlabs-ops linked a pull request Mar 21, 2022 that will close this issue
mfdlabs-ops added a commit that referenced this issue Mar 21, 2022
* Add Oktokit as a dependency

* #46: Add .IsMatch and .Match extensions for Regex mathcing

* #46: Add a simple UDP receiver that will enable maintenance when hit

* Fix a little issue with Json objects

* #46: Add helper methods for auto deployer

* Sync with upstream/dev/261

* Please enable arg -TENABLE_CONCURRENT_LOGGING for background logging, this was put into place because it was causing the app not to exit.

* Move the Lock to LoggingSystem and create concurrent data

* #46: Provides WCF classes

* #46: Add debug scripts, add auto deployer build scripts

* #46: Shutdown UDP server on exit

* #46: Integrate AutoDeployer Windows Service

Co-authored-by: Nikita Petko <petko@vmminfra.net>
Co-authored-by: Github Enterprise <enterprise@git.mfdlabs.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

1 participant