Skip to content

Migrate vanillaframework.io to PS6 / Juju Charm deployment#5560

Merged
jmuzina merged 18 commits intomainfrom
feature/charm
Aug 11, 2025
Merged

Migrate vanillaframework.io to PS6 / Juju Charm deployment#5560
jmuzina merged 18 commits intomainfrom
feature/charm

Conversation

@jmuzina
Copy link
Member

@jmuzina jmuzina commented Jun 26, 2025

Done

This is a large item of work, and it is split into three feature PRs that should be merged into this branch before the feature branch is merged to main.

Fixes #5551
Fixes WD-23029

QA

  • completed in feature PRs

@webteam-app
Copy link

Comment on lines +19 to +37
runs-on: ubuntu-latest
# Set the environment based on the trigger: 'release' for Production, 'push' for Staging.
environment: ${{ github.event_name == 'release' && 'Production' || 'Staging' }}
outputs:
charm_name: ${{ steps.setup-vars.outputs.charm_name }}
channel: ${{ steps.setup-vars.outputs.channel }}
juju_controller_name: ${{ steps.setup-vars.outputs.juju_controller_name }}
juju_model_name: ${{ steps.setup-vars.outputs.juju_model_name }}
environment: ${{ steps.setup-vars.outputs.environment }}
steps:
- name: setup vars
id: setup-vars
run: |
echo "charm_name=${{ vars.CHARM_NAME }}" >> $GITHUB_OUTPUT
echo "channel=${{ vars.CHANNEL }}" >> $GITHUB_OUTPUT
echo "juju_controller_name=${{ vars.JUJU_CONTROLLER_NAME }}" >> $GITHUB_OUTPUT
echo "juju_model_name=${{ vars.JUJU_MODEL_NAME }}" >> $GITHUB_OUTPUT
# Set the environment variable based on the trigger.
echo "environment=${{ github.event_name == 'release' && 'Production' || 'Staging' }}" >> $GITHUB_OUTPUT

deploy:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Comment on lines +40 to +56
needs: setup
name: Deploy
# https://github.com/canonical/webteam-devops
uses: canonical/webteam-devops/.github/workflows/deploy.yaml@main
with:
environment: ${{ needs.setup.outputs.environment }}
charm_name: ${{ needs.setup.outputs.charm_name }}
channel: ${{ needs.setup.outputs.channel }}
juju_controller_name: ${{ needs.setup.outputs.juju_controller_name }}
juju_model_name: ${{ needs.setup.outputs.juju_model_name }}
secrets:
VAULT_APPROLE_ROLE_ID: ${{ secrets.VAULT_APPROLE_ROLE_ID }}
VAULT_APPROLE_SECRET_ID: ${{ secrets.VAULT_APPROLE_SECRET_ID }}
# See https://canonical-charmcraft.readthedocs-hosted.com/en/stable/reference/commands/login/ to create a Charmhub token
# Use `charmcraft login --export path/to/save-token-file` to create the token file.
# Then, base64-encode it: `cat path/to/save-token-file | base64`
CHARMHUB_TOKEN: ${{ secrets.CHARMHUB_TOKEN }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
jmuzina and others added 11 commits July 22, 2025 08:58
* Add charm config / local dev docs

* rm extra line

* charm readme refinements

* note about using the PAAS charm
* Add charm config / local dev docs

* rm extra line

* charm readme refinements

* pack & upload charm in CIK

* Use webteam devops workflow

* tweak comments. partially for correctness, partially to force a rebuild with the updated juju controller names

* add comments

* note about build

* test one-job workflow

* remove temporarily skipped check-charm-changes job

* Revert "test one-job workflow"

This reverts commit 3afb9d8.

* use the devops workflow
@jmuzina jmuzina requested a review from advl July 23, 2025 16:34
@jmuzina jmuzina marked this pull request as ready for review July 23, 2025 16:34
@jmuzina jmuzina changed the title wip: Migrate vanillaframework.io to PS6 / Juju Charm deployment Migrate vanillaframework.io to PS6 / Juju Charm deployment Jul 23, 2025
@jmuzina
Copy link
Member Author

jmuzina commented Aug 11, 2025

Production is not currently using PS6 due to some ongoing environment stability issues, but I'm merging this now as this PR will likely not need any changes when PS6 becomes more stable. It will also serve as a reference for charming other DS sites.

This will have the following results in the short term:
Pushes to main update PS6 staging and PS5 staging. staging.vf.io currently points to PS6. PS5 is kept as a backup for now.
Releases update PS6 production and PS5 production. vf.io currently points to PS5 pending resolution of infra issues.
Updates flask-base to 2.6.0

@jmuzina jmuzina added Review: Code +1 Review: Percy +1 and removed Review: Code needed Review: Percy needed This PR needs a review of Percy for visual regressions labels Aug 11, 2025
@jmuzina jmuzina merged commit 209adfd into main Aug 11, 2025
14 checks passed
@jmuzina jmuzina deleted the feature/charm branch August 11, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Charm the docs site

3 participants