Skip to content

Instantly share code, notes, and snippets.

@jonwhittlestone
Last active June 13, 2023 10:21
Show Gist options
  • Save jonwhittlestone/a3b0a41ad7e0f1fd2b2ce5f782b5bf31 to your computer and use it in GitHub Desktop.
Save jonwhittlestone/a3b0a41ad7e0f1fd2b2ce5f782b5bf31 to your computer and use it in GitHub Desktop.
BID-5337-vanilla

BID-5337-vanilla.md

Jenins Build: http://jenkins.uk.harpercollins.org:8080/job/Pipeline-bids3-alpha/job/BID-5352-vanilla-client-specific-settings/

DataGrip Trial Subscription until

9th June 2023

Tools and Snippets

  • Edit an ansible vault file

    • ansible-vault edit ./BIDS/inventories/staging/group_vars/vault.yml --vault-password-file=./BIDS/.ansible_vault
  • Inspect PostgresDB dbs and users from within the container with psql

    psql -U seadev
    \l
    \du
    
  • logs of bids service

    docker service logs -f bids3_hcp_internal
    
  • Generate a password of 12 chars

    • openssl rand -base64 12 # includes symbols
    • date +%s | sha256sum | base64 | head -c 12 ; echo
  • Check/Run the deploy playbook in vagrant

ansible-playbook -i ./BIDS/inventories/dev/hosts ./BIDS/deploy-bids-swarm.yml --vault-password-file=./BIDS/.ansible_vault --key-file=/home/fam/.vagrant.d/insecure_private_key --extra-vars="docker_tag=R-23_05_16_2-e8ede64-SNAPSHOT ansible_remote_user=vagrant" --check
  • Run Postgres 10.17 locally
    docker run -d \
        --name hzn-postgres \
        -p 5433:5432 \
        -e POSTGRES_PASSWORD=password \
        -v postgres:/var/lib/postgresql/data \
        postgres:10.17-buster
    

Resources

Existing tickets in Epic

❶ BID-5348 Vanilla Client in Ansible deployment (Jon)

This is the pull request for merging Vanilla infrastructure to development branch.

https://bitbucket.org/hcpuksea/bids3-environments/pull-requests/428

At time of writing, release and development are diverged, so the merge will need to be done manually to release by duplicating the PR from a branch that has been branched from release.

❷ BID-5352 Vanilla Create Client specific settings (Jon)

./manage.py runserver --settings=bids3.settings.vanilla.dev

  1. Deploying success on dev with new client

  2. Operating success on dev with new client (Postgres, DWH, ES)

    • Product Search

❸ BID-5347 Vanilla Client in Pipeline (Jon)

When the client_settings have been merged into development, you can run a feature of bids3-alpha that has a Jenkinsfile that points to a feature branch of cicd_scripts.

An example of this branch is here:

https://bitbucket.org/hcpuksea/bids3-alpha/branch/BID-5347-vanilla-cicd-120623.1

and it does the following:

  • includes the definitions of the vanilla client in the relevant build stages (groovy)
  • references a feature branch of the bids3-environments ansible scripts repo that deploys to the vanilla infrastructure.

This pipeline may not build succesfully because it has failed at the vanilla step (see this image), please check the table below.

Please ensure that you select the inventory for the relevant environment.

Error Message Solution
django.db.utils.OperationalError: FATAL:  role "vanilla" does not exist
ansible-playbook -i BIDS/inventories/ci/hosts --key-file /seaadmin_id_rsa BIDS/postgresql-master.yml --user seaadmin --vault-password-file=/.ansible-vault-password-file
psycopg2.errors.InsufficientPrivilege: permission denied for relation django_migrations
The database hasn't been created.

❹ BID-5375 domains for nosycrow and vanilla-horizon

❺ BID-5349 Vanilla Client Mule Flows (Gayatri)

  • ES
  • Lists

❻ BID-5350 Vanilla django superusers (Jon)

❼ BID-5351 Vanilla nginx config (Jon)

  • CI
  • Staging
  • Prod

❽ BID-5353 Vanilla feature flags in settings (Jon)

❾ BID-5354 Vanilla App monitoring (Ali)

  • New Relic
  • Data dog
  • Google Analytics

❿ BID-5355 Vanilla postgres/lists (Jon)

⓫ BID-5356 Vanilla XL3 reports (Jon)

⓬ BID-5364 Vanilla Okta / AD group setup (Jon)

BID-5366 Azure Blob storage / Proxy for Horizon to serve blob assets (Jon)

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