You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Next »

Installing development tools

Building thiss-js and related packages requires a working docker environment as the build/deploy process runs in a docker container.

Cloning repositories

Prepare your deploy environement.

git clone https://github.com/TheIdentitySelector/thiss-js
git clone git@github.com:TheIdentitySelector/origin.thiss.io
git clone git@github.com:seamlessaccess/origin-service

Beta deployment (use.thiss.io)

Frontend

To deploy <version> to beta (use.thiss.io)

  1. Clone the git repository in your computer (git@github.com:TheIdentitySelector/thiss-ops.git)
  2. Open cosmos-rules.yaml and update the version under thiss::dockerhost.
    '^static-[0-9]+\.thiss\.io$':
       sunet_iaas_cloud:
       thiss::dockerhost:
          version: '5:19.03.13~3-0~ubuntu-focal'
       thiss::static:
          ds_version: 1.5.0
          base_url: https://use.thiss.io/
          mdq_search_url: https://md.thiss.io/entities/
          domain: use.thiss.io
          context: thiss.io
       https:
  3. Do git add global/overlay/etc/puppet/cosmos-rules.yaml and git commit. You should ofcourse have right to commit in the repository.
  4. Run the script thiss-ops/bump-tag afterwards.
  5. To verify that the new version is installed, log in to the servers static-1.thiss.io and static.thiss.io and enter 'run-cosmo -v'. 
  6. You can check the status by running the command service docker-thiss_js status.
  7. You can also enter 'docker ps' in order to see if the new version is present on docker image tag. 

Verification

Verify that the changes have taken effect - this may take a while depending on how quickly the CDN picks up the changes. Find out which changes should be tested, check with the developer team or technical lead Leif Johansson. In addition to that, it should be checked that the discovery service works by visiting https://use.thiss.io. It is good to do it in a private window of your browser in case your browser has cached the old version. Click on the 'Login' button and see that it is possible to choose different IDPs from there. Check that the persistent service works by going back and choosing different organizations. You should be able to see the list of organizations that you have chosen and be able to edit them as well. Check that these functions work. https://use.thiss.io/manifest.json is supposed to show the latest version number. Sometimes you have to purge all cache in Fastly but this should be the last measure.

Rollback

In order to rollback simply downgrade the version in cosmos-rules.yaml and follow the exact steps for committing and pushing the the changed to the git remote repo.

Backend

Deploying the backend components using standard cosmos-process for docker components in https://github.com/TheIdentitySelector/thiss-ops repository.

Verification

(...)

Rollback

Simply undo the  changes and go back to old changes and commit them in thiss-ops repository.

Production deployment (service.seamlessaccess.org)

Frontend

Prepare your deploy environement. The current whitelist needs to be checked with the master list before each deploy. Note that use.thiss.io does not do whitelisting which means the WHITELIST variable is not set.

Whitelisting

It is important to set the WHITELIST environment variable to the comma-separated list of the current whitelisted domains before deploying. Ask Marina or Leif to verify the list. The list is updated here Seamless Access Configuration Parameters.

It is better to remove the old thiss-builder docker image from your system and rebuild it by running the deployment routine given below in case new NPM libraries are added in remote branch.

To deploy <version> to production

# cd thiss-js && git pull
# git checkout <version>
# make clean
# make BASE_URL='https://service.seamlessaccess.org/' COMPONENT_URL='https://service.seamlessaccess.org/cta/' MDQ_URL='https://md.seamlessaccess.org/entities/' PERSISTENCE_URL='https://service.seamlessaccess.org/ps/' SEARCH_URL='https://md.seamlessaccess.org/entities/' STORAGE_DOMAIN='service.seamlessaccess.org' LOGLEVEL='error' DEFAULT_CONTEXT='seamlessaccess.org' WHITELIST=$WHITELIST build_in_docker
# rsync -avz --exclude .git --exclude CNAME --exclude README.md --delete dist/ ../origin-service/
# cd ../origin-service
# git diff

The final "git diff" should show a set of differences against the currently deployed version. Now commit and push this version to origin-service:

# git add .
# git commit -m "deploy <version>"
# git push

Verification

Verify that the changes have taken effect - this may take a while depending on how quickly the CDN picks up the changes. Find out which changes should be tested, check with the developer team or technical lead Leif Johansson. In addition to that, it should be checked that the discovery service works as usual by trying to login to a service for example wiki.sunet.se. It is good to do it in a private window of your browser in case your browser has cached the old version. https://service.seamlessaccess.org/manifest.json is supposed to show the latest version number. Sometimes you have to purge all cache in Fastly but this should be the last measure.

Rollback

In order to rollback revert and push the previous version of the origin.thiss.io repo.

# git revert <commit>
# git push

<commit> is the commit you want to revert (remove), see "git log" to find the correct one.

Backend

Deploying the backend components using standard cosmos-process for docker components in https://github.com/TheIdentitySelector/thiss-ops repository.  (...)

Verification

(...)

Rollback

Simply undo the  changes and go back to old changes and commit them in thiss-ops repository.


  • No labels