Skip to content

Conversation

@Amdrel
Copy link
Contributor

@Amdrel Amdrel commented Jan 19, 2026

Description

This patch adds a script as described in my comment in T410730 that can assist with deployment. I've left out GitHub Actions integration for now, but I can add that later if we think it's a good idea.

@don-vip I haven't tested this script against the encoders. However, I did test most of it against another machine on my network with the exception of lines 50-58 of deploy.sh. If you're okay with me testing it or you want to do it, please let me know. If we can test this against a real encoder instance I would feel more comfortable taking this PR out of draft status.

Update: I've tested this against encoding01 and encoding02 after making some fixes and it appears to be working the way I expect.

Configuration

This script relies heavily on environment variables since that would make it easier to work with in a CI/CD workflow if/when we implement something like that.

  • V2C_USERNAME: The ssh username to use when connecting to the encoder
  • V2C_CONSUMER_KEY: Value that gets substituted into the puppet manifest
  • V2C_CONSUMER_SECRET: Value that gets substituted into the puppet manifest
  • V2C_REDIS_PW: Value that gets substituted into the puppet manifest

Changes

  • Add new deploy.sh Bash script to assist with deployments

@don-vip
Copy link
Collaborator

don-vip commented Jan 20, 2026

Hi Amdrel, sure go ahead for testing :)

@Amdrel
Copy link
Contributor Author

Amdrel commented Jan 20, 2026

I tested the script against encoder01 and I need to make a small fix to the systemd unit file that we generate. The ExecReload command in there currently is broken due to a missing environment variable resulting in options not being passed in properly. I'll have to do that tomorrow as it's getting late.

@Amdrel Amdrel force-pushed the deployment-script branch from 79f32f1 to 68e7928 Compare January 20, 2026 18:27
@Amdrel Amdrel marked this pull request as ready for review January 20, 2026 18:27
@Amdrel Amdrel changed the title [Draft] Add non-blocking deployment script Add non-blocking deployment script Jan 20, 2026
@Amdrel
Copy link
Contributor Author

Amdrel commented Jan 20, 2026

I've modified the manifest to always restart the service when applied rather than doing it manually by adding notify to the git pull and pip install steps (which always notify). I tried to eliminate any possibility of puppet doing an implicit restart of the service during manifest application without success, so an apply and manual restart as I was doing before could lead to the service being restarted twice. I decided to let Puppet handle it instead with a custom restart command since it's intelligent and won't restart the service more than it needs to. I ran this against encoding01 and encoding02 and it consistently applied the manifest and restarted the workers with the --no-block option.

Also, I added an explicit daemon-reload since Puppet didn't seem to consistently do that when unit changes were made with file, but that's a fix for an edge case since that file will not change often. It's something that happened to me while testing that I figured I would fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants