...
Please follow below guide after the tech team has cut the new release. You need to be authorized to push the image to docker.sunet.se, see this.
Build thiss-js
- git clone https://github.com/TheIdentitySelector/thiss-js
- git checkout <version-to-be-released>
- make docker && make docker_push_sunet
...
- sunet
Build thiss-mdq
- git clone git@github.com:TheIdentitySelector/thiss-mdq.git
- make
Beta deployment
Frontend (use.thiss.io)
...
To deploy <version> to beta (use.thiss.io)
- Clone the git repository in your computer (git@github.com:TheIdentitySelector/thiss-ops.git)
- Open
global/overlay/etc/hiera/data/common.yaml, check the 'max-age' under 'cache_control_beta'. If the current s-max age is 2 days or 172800 seconds, you need to change it to 10 hours, two days before the deployment. If it is one day, you need to change it to 10 hours exactly 1 day before. We need to do it so the old cache gets cleared from non-fastly cache nodes and new files are requested from our backend during the deployment. - Wait as long as the old 's-
max-age'and then proceed to the next step. You can even check in the 'developer tools' of your browser (e.g. Chrome, Firefox) that the response headers have the new s-maxage of 10 hours. You can try by using https://demo.beta.seamlessaccess.org/ - Update the
ds_version_betainglobal/overlay/etc/hiera/data/common.yaml.
| Code Block | ||
|---|---|---|
| ||
ds_version_beta: '2.1.51'
cache_control_beta: 'public, max-age=36000, must-revalidate, s-maxage=172800, proxy-revalidate' |
- Run
git addglobal/overlay/etc/hiera/data/common.yamlandgit commit. You should ofcourse have right to commit in the repository. - Run the script
thiss-ops/bump-tagafterwards. - To verify that the new version is installed, log in to the servers static-1.thiss.io and static-2.thiss.io and enter 'run-cosmo -v'.
- You can check the status by running the command
service docker-thiss_js status. - You can also enter '
docker ps' in order to see if the new version is present on docker image tag. - We may have to do more than one version upgrade to make it backward compatible, check https://github.com/TheIdentitySelector/thiss-js/blob/staging/RELEASE.md
- Check that the login works using demo.beta.seamlessaccess.org. You can check the transaction check & page speed in Pingdom after each upgrade. Page speed shows the response headers and other information for each file loaded from https://use.thiss.io.
- It is also good to check the HIT ratio (
observability > service overview) and origin latency under CDN services from Fastly GUI for the service 'use.thiss.io'. Chek that the HIT ratio is high enough, should be around 98 to 99 percent, latency is way below 5 seconds. - After the verification step is done, everything looks good and open
global/overlay/etc/hiera/data/common.yamland change 'cache_control_betato original value after 10 hours have passed.
Verification
...
Code Block cache_control_beta: 'public, max-age=36000, must-revalidate, s-maxage=172800, proxy-revalidate'- Log in to the
servers static-1.thiss.io, static-2.thiss.io, static-1.aws2.thiss.io&static-2.aws2.sthiss.ioand enter 'run-cosmo -v'. - Restart the service by running the command
service sunet-thiss_js restart. - One liner to check that service is working by showing expected version and
s-maxage.Code Block run-cosmos && service sunet-thiss_js restart && sleep 5 && curl http://localhost/manifest.json && echo "" && docker exec thiss_js-thiss-js-1 env |grep "s-maxage" - It is also good to check the HIT ratio & origin offload (
observability > service overview) from Fastly GUI for the service 'use.thiss.io'. Chek that the HIT ratio & origin offload are high enough, should be around 98 to 99 percent. - Wait as long as the old 's-
max-age'and then proceed to the next step. You can even check in the 'developer tools' of your browser (e.g. Chrome, Firefox) that the response headers have the new s-maxage of 10 hours. You can try by using https://demo.beta.seamlessaccess.org/ - Update the
ds_version_betainglobal/overlay/etc/hiera/data/common.yaml.
| Code Block | ||
|---|---|---|
| ||
ds_version_beta: '2.1.51' |
- Run
git addglobal/overlay/etc/hiera/data/common.yamlandgit commit. You should ofcourse have right to commit in the repository. - Run the script
thiss-ops/bump-tagafterwards. - To verify that the new version is installed, log in to the
servers static-1.thiss.io, static-2.thiss.io, static-1.aws2.thiss.io&static-2.aws2.sthiss.ioand enter 'run-cosmo -v'. - Restart the service by running the command
service sunet-thiss_js restart. - You can check the status by running the command
service sunet-thiss_js status. - You can run
curl -k https://localhost/manifest.jsonto see that it shows current version and no errors. - You can also enter '
docker ps' in order to see if the new version is present on docker image tag. - One liner to check that service is working by showing expected version. (the seconds for sleeping may need to be adjusted as it will take time to download the new docker image)
Code Block run-cosmos && service sunet-thiss_js restart && sleep 15 && curl http://localhost/manifest.json && echo "" && docker ps - We may have to do more than one version upgrade to make it backward compatible, check https://github.com/TheIdentitySelector/thiss-js/blob/staging/RELEASE.md
- Check that the login works using demo.beta.seamlessaccess.org. You can check the transaction check & page speed in Pingdom after each upgrade. Page speed shows the response headers and other information for each file loaded from https://use.thiss.io
...
- .
- It is also good to check the HIT ratio & origin offload (
observability > service overview) from Fastly GUI for the service 'use.thiss.io'. Chek that the HIT ratio & origin offload are high enough, should be around 98 to 99 percent. - After the verification step is done, everything looks good and open
global/overlay/etc/hiera/data/common.yamland change 'cache_control_betato original value after 10 hours have passed. - Restart the service by running the command
service sunet-thiss_js restart. One liner to check that service is working by showing expected version ands-maxage.Code Block run-cosmos && service sunet-thiss_js restart && sleep 5 && curl http://localhost/manifest.json && echo "" && docker exec thiss_js-thiss-js-1 env |grep "s-maxage"
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. You can check the login works through https://demo.beta.seamlessaccess.org as well.
Rollback
In order to rollback simply downgrade the version in cosmos-rules.yaml and follow the exact steps for committing and pushing the the changes to the git remote repo.
Backend (md.thiss.io)
- Clone the git repository in your computer (git@github.com:TheIdentitySelector/thiss-ops.git)
- Update the
versionunder thiss::mdq for both 'md-1.thiss.io' and 'md-2.thiss.io'
| Code Block |
|---|
md-1.thiss.io:
sunet_iaas_cloud:
thiss::dockerhost:
version: '5:20.10.12~3-0~ubuntu-bionic'
thiss::mdq:
version: 1.3.2
src: https://a-1.thiss.io/metadata.json
base_url: https://md.thiss.io
post: /usr/sbin/service docker-thiss_mdq restart
https:
http: |
- Do git add global/overlay/etc/puppet/cosmos-rules.yaml and git commit. You should ofcourse have right to commit in the repository.
- Run the script thiss-ops/bump-tag afterwards.
- To verify that the new version is installed, log in to the servers md-1.thiss.io and md-2.thiss.io and enter 'run-cosmo -v'.
- Restart the service by running the command
service sunet-thiss-mdq restart. - You can check the status by running the command
service sunet-thiss-mdq status. - You can run
curl -k http://localhost/to see that it shows right version, metadata information and no errors. - You can also enter 'docker ps' in order to see if the new version is present on docker image tag.
Verification
Check that https://md.thiss.io is up and showing the right version. Keep an eye on the metadata check alarm on the internal Nagios instance https://monitor.seamlessaccess.org
Rollback
Simply undo the changes and go back to old changes and commit them in thiss-ops repository.
Production deployment
Frontend (service.seamlessaccess.org)
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.
To deploy <version> to production (service.seamlessaccess.org)
- Clone the git repository in your computer (git@github.com:TheIdentitySelector/thiss-ops.git)
- Open global/overlay/etc/hiera/data/common.yaml and check that the whitelist is right or change it if needed.
Warning title 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.
- Open
global/overlay/etc/hiera/data/common.yaml, check the 's-maxage' under 'cache_control_prod. If the current s-max age is 2 days or 172800 seconds, you need to change it to 10 hours, two days before the deployment. If it is one day, you need to change it to 10 hours exactly 1 day before. We need to do it so the old cache gets cleared from non-fastly cache nodes and new files are requested from our backend during the deployment.Code Block cache_control_prod: 'public, max-age=36000, must-revalidate, s-maxage=172800, proxy-revalidate' - Log in to
static-*.orgservers and enter 'run-cosmo -v'. - Restart the service by running the command
service sunet-thiss_js restart. - One liner to check that service is working by showing expected version and
s-maxage.Code Block run-cosmos && service sunet-thiss_js restart && sleep 5 && curl http://localhost/manifest.json && echo "" && docker exec thiss_js-thiss-js-1 env |grep "s-maxage" - It is good to see that backends are not overloaded, you can check the HIT ratio (
observability > service overview) from Fastly GUI for the service 'service.seamlessaccess.org'. Origin latency can be checked here https://manage.fastly.com/observability/dashboard/custom/1cHLXZhdo3OZyqpPmCTdYP/historic/5vqg1bmES8N0KNljosrwVX. The latency should be less than 5 seconds. - Keep an eye on the transaction check in pingodm that it is not failing after lowering the
s-maxage. - Wait as long as the old 's-
maxage'and then proceed to the next step. You can even check in the 'developer tools' of your browser (e.g. Chrome, Firefox) that the response headers have the new s-maxage of 10 hours. You can try by using https://demo.seamlessaccess.org/ - Update the
ds_version_prodinglobal/overlay/etc/hiera/data/common.yaml.Code Block language bash ds_version_prod: '2.1.51' - Run
git add
Rollback
In order to rollback simply downgrade the version in cosmos-rules.yaml and follow the exact steps for committing and pushing the the changes to the git remote repo.
Backend
- Clone the git repository in your computer (git@github.com:TheIdentitySelector/thiss-ops.git)
- Update the
versionunder thiss::mdq for both 'md-1.thiss.io' and 'md-2.thiss.io'
| Code Block |
|---|
md-1.thiss.io:
sunet_iaas_cloud:
thiss::dockerhost:
version: '5:20.10.12~3-0~ubuntu-bionic'
thiss::mdq:
version: 1.3.2
src: https://a-1.thiss.io/metadata.json
base_url: https://md.thiss.io
post: /usr/sbin/service docker-thiss_mdq restart
https:
http: |
- Do git add global/overlay/etc/puppet/cosmos-rules.yaml and git commit. You should ofcourse have right to commit in the repository.
- Run the script thiss-ops/bump-tag afterwards.
- To verify that the new version is installed, log in to the servers md-1.thiss.io and md-2.thiss.io and enter 'run-cosmo -v'.
- You can check the status by running the command service docker-thiss_mdq status.
- You can also enter 'docker ps' in order to see if the new version is present on docker image tag.
Verification
Check that https://md.thiss.io is up and showing the right version. Keep an eye on the metadata check alarm on the internal Nagios instance https://monitor.seamlessaccess.org
Rollback
Simply undo the changes and go back to old changes and commit them in thiss-ops repository.
Production deployment (service.seamlessaccess.org)
Frontend
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.
To deploy <version> to production (service.seamlessaccess.org)
- Clone the git repository in your computer (git@github.com:TheIdentitySelector/thiss-ops.git)
- Open
global/overlay/etc/hiera/data/common.yaml and check that the whitelist is right or change it if needed.
OpenWarning title 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.
.yamlandgit commit. You should ofcourse have right to commit in the repository. Rungit add global/overlay/etc/hiera/data/common.yaml, check the 's-maxage' under 'cache_control_prod. If the current s-max age is 2 days or 172800 seconds, you need to change it to 10 hours, two days before the deployment. If it is one day, you need to change it to 10 hours exactly 1 day before. We need to do it so the old cache gets cleared from non-fastly cache nodes and new files are requested from our backend during the deployment. - It is good to see that backends are not overloaded, you can check the HIT ratio (
observability > service overview) and origin latency under CDN services from Fastly GUI for the service 'service.seamlessaccess.org'. - Keep an eye on the transaction check in pingodm that it is not failing after lowering the
s-maxage. - Wait as long as the old 's-
maxage'and then proceed to the next step. You can even check in the 'developer tools' of your browser (e.g. Chrome, Firefox) that the response headers have the new s-maxage of 10 hours. You can try by using https://demo.seamlessaccess.org/ Update the - as well if whitelist is changed. You should ofcourse have right to commit in the repository.
- Run the script
thiss-ops/bump-tagafterwards. - To verify that the new version is installed, log in to below servers and enter 'run-cosmo -v'.
static-1.aws1.geant.eu.seamlessaccess.org
static-1.aws2.geant.eu.seamlessaccess.org
static-1.ntx.sunet.eu.seamlessaccess.org
static-1.se-east.sunet.eu.seamlessaccess.org
static-2.aws1.geant.eu.seamlessaccess.org
static-2.aws2.geant.eu.seamlessaccess.org
static-2.ntx.sunet.eu.seamlessaccess.org
static-2.se-east.sunet.eu.seamlessaccess.org
- Restart the service by running the command
service sunet-thiss_js restart. - You can check the status by running the command
service sunet-thiss_js status. - You can run
curl -k https://localhost/manifest.jsonto see that it shows current version and no errors. - You can also enter '
docker ps' in order to see if the new version is present on docker image tag. - One liner to check that service is working by showing expected version. (the seconds for sleeping may need to be adjusted as it will take time to download the new docker image)
Code Block run-cosmos && service sunet-thiss_js restart && sleep 15 && curl http://localhost/manifest.json && echo "" && docker ps - We may have to do more than one version upgrade to make it backward compatible, check https://github.com/TheIdentitySelector/thiss-js/blob/staging/RELEASE.md
- Check that the login works using demo.seamlessaccess.org. You can check the transaction check & page speed in Pingdom after each upgrade. Page speed shows the response headers and other information for each file loaded from https://service.seamlessaccess.org.
- It is also good to check the HIT ratio (
observability > service overview) from Fastly GUI for the service 'service.seamlessaccess.org'. Chek that the HIT ratio is high enough, should be around 98 to 99 percent. Origin latency can be checked here https://manage.fastly.com/observability/dashboard/custom/1cHLXZhdo3OZyqpPmCTdYP/historic/5vqg1bmES8N0KNljosrwVX. The latency should be less than 5 seconds. - After the verification step is done, everything looks good and few hours have passed, open
global/overlay/etc/hiera/data/common.yamland change 'max-age' under 'cache_control_prod'to original value. - Log in to
static-*.orgservers and enter 'run-cosmo -v'. - Restart the service by running the command
service sunet-thiss_js restart. One liner to check that service is working by showing expected version ands-maxage.Code Block run-cosmos && service sunet-thiss_js restart && sleep 5 && curl http://localhost/manifest.json && echo "" && docker exec thiss_js-thiss-js-1 env |grep "s-maxage" - You can check the status by running the command service docker-thiss_js status.
- You can also enter '
docker ps' in order to see if the new version is present on docker image tag. - We may have to do more than one version upgrade to make it backward compatible, check https://github.com/TheIdentitySelector/thiss-js/blob/staging/RELEASE.md
- Check that the login works using demo.seamlessaccess.org. You can check the transaction check & page speed in Pingdom after each upgrade. Page speed shows the response headers and other information for each file loaded from https://service.seamlessaccess.org.
- It is also good to check the HIT ratio (
observability > service overview) and origin latency under CDN services from Fastly GUI for the service 'service.seamlessaccess.org'. Chek that the HIT ratio is high enough, should be around 98 to 99 percent and latency is way below 5 seconds. After the verification step is done, everything looks good and few hours have passed, open
ds_version_prod in global/overlay/etc/hiera/data/common.yaml.| Code Block | ||
|---|---|---|
| ||
ds_version_prod: '2.1.51'
cache_control_prod: 'public, max-age=36000, must-revalidate, s-maxage=172800, proxy-revalidate' |
git add global/overlay/etc/hiera/data/common.yaml and git commit. You should ofcourse have right to commit in the repository. Run git add global/overlay/etc/hiera/data/common.yamlas well if whitelist is changed. You should ofcourse have right to commit in the repository.Run the script thiss-ops/bump-tagafterwards.To verify that the new version is installed, log in to below servers and enter 'run-cosmo -v'. static-1.aws1.geant.eu.seamlessaccess.org
static-1.aws2.geant.eu.seamlessaccess.org
static-1.ntx.sunet.eu.seamlessaccess.org
static-1.se-east.sunet.eu.seamlessaccess.org (have to run service sunet-thiss_js restart manually)
static-2.aws1.geant.eu.seamlessaccess.org
static-2.aws2.geant.eu.seamlessaccess.org
static-2.ntx.sunet.eu.seamlessaccess.org
static-2.se-east.sunet.eu.seamlessaccess.org
global/overlay/etc/hiera/data/common.yaml and change 'max-age' under 'cache_control_prod' to original value.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. You can check the login works through https://demo.seamlessaccess.org as well.
...
- Clone the git repository in your computer (git@github.com:TheIdentitySelector/thiss-ops.git)
- Open global/overlay/etc/hiera/data/common.yaml and check that the whitelist is right or change it if needed.
Warning title 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.
- Do git add global/overlay/etc/hiera/data/common.yaml as well if whitelist is changed. You should ofcourse have right to commit in the repository.
- Run the script thiss-ops/bump-tag afterwards.
- Log in to below servers and enter 'run-cosmo -v'. 'thiss-js' docker container should get restarted.
static-1.aws1.geant.eu.seamlessaccess.org
static-1.aws2.geant.eu.seamlessaccess.org
static-1.ntx.sunet.eu.seamlessaccess.org
static-1.se-east.sunet.eu.seamlessaccess.org
static-2.aws1.geant.eu.seamlessaccess.org
static-2.aws2.geant.eu.seamlessaccess.org
static-2.ntx.sunet.eu.seamlessaccess.org
static-2.se-east.sunet.eu.seamlessaccess.org.seamlessaccess.org
- Restart the service by running the command
service sunet-thiss_js restart. - You can check the status by running the command
service docker sunet-thiss_js status.- Log into Fastly management web GUI https://manage.fastly.com/ and purge all cache for the service 'service.seamlessaccess.org' otherwise it will take the amount of seconds set in 's-maxage' in the static servers for the Fastly servers to fetch the updated JSON JS page.
Verification
Visit https://service.seamlessaccess.org/ps.js should https://service.seamlessaccess.org/ps/index.html in browser and open the Developers tab. Find out the 'https://service.seamlessaccess.org/ps_<contetn hash>.js' link from the Network tab. That link should contain the new whitelisted domain(s). It may take a while to get updated depending on the age of the cache in your browser.
It is also good to check that the service is working by visiting https://demo.seamlessaccess.org.
Backend (md.seamlessaccess.org)
- Clone the git repository in your computer (git@github.com:TheIdentitySelector/thiss-ops.git)
- Update the
versionunder thiss::mdq for each site (ntx, se-east, aws1 and aws2)Code Block '^md-[0-9]\.ntx\.sunet\.eu\.seamlessaccess\.org$': thiss::dockerhost: thiss::mdq: version: 1.3.2 src: https://meta.ntx.sunet.eu.seamlessaccess.org/metadata.json base_url: https://md.seamlessaccess.org post: /usr/sbin/service docker-thiss_mdq restart - Do git add global/overlay/etc/puppet/cosmos-rules.yaml and git commit. You should ofcourse have right to commit in the repository.
- Run the script thiss-ops/bump-tag afterwards.
- To verify that the new version is installed, log in to below servers and enter 'run-cosmo -v'.
md-1.aws1.geant.eu.seamlessaccess.org
md-1.aws2.geant.eu.seamlessaccess.org
md-1.ntx.sunet.eu.seamlessaccess.org
md-1.se-east.sunet.eu.seamlessaccess.org
md-2.aws1.geant.eu.seamlessaccess.org
md-2.aws2.geant.eu.seamlessaccess.org
- Restart the service by running the command
service sunet-thiss-mdq restart. - You can check the status by running the command
service docker sunet-thiss_-mdq status.- You can run
curl -k http://localhost/to see that it shows right version, metadata information and no errors. - You can also enter 'docker ps' in order to see if the new version is present on docker image tag.
...

