Skip to content

Deployment of Explorer to staging server

Jens Krause edited this page May 26, 2017 · 6 revisions

How to deploy Explorer to staging

  1. We login to the cardano-deployer.
  2. We go to the scripts folder.
  3. We run the script found here https://github.com/ksaric/iohk-nixops/blob/master/scripts/deploy-explorer-linux.sh with the commit hash.

Example:

ssh [email protected]
cd ~/devops-86-deploy-staging-explorer/scripts/
./deploy-explorer-linux.sh e87276f9d794029cc77ddaddd05c4c570989cc67

How to update to latest dependencies of cardano-sl

  1. Login to cardano-deployer as described above.
  2. cd ~/devops-86-deploy-staging-explorer/pkg
  3. Open generate.sh to update dependencies
  4. Execute generate.sh
  5. Deploy cardano-deployer as described above.

How to dump Explorer logs from staging

  1. We login to the cardano-deployer.
  2. From cardano-deployer we need to ssh into the sl-explorer machine where explorer is deployed. Right, it's not deployed on cardano-deployer.
  3. Find the logs you are interested in (node.log).
  4. Exit from the sl-explorer machine, we need to copy the logs to cardano-deployer.
  5. Copy the interesting logs.
  6. Exit from the cardano-deployer machine and copy it locally.

Example (I'm guessing you don't have /home/ksaric/Downloads/explorer-node.log as a path):

ssh [email protected]
nixops ssh -d devops-86 sl-explorer
cd /var/lib/cardano-node/
ls -la
exit
nixops scp -d devops-86 --from sl-explorer /var/lib/cardano-node/node.log /home/staging/devops-86-deploy-staging-explorer/explorer-node.log
exit
scp [email protected]:/home/staging/devops-86-deploy-staging-explorer/explorer-node.log /home/ksaric/Downloads/explorer-node.log

How to dump Explorer logs from localhost

  1. Run it.
  2. Check logs. socket-io-.log should be in your root cardano-sl-explorer, and the node log should be in cardano-sl/logs/....

How to log socket.io by frontend

  1. Open any page of Explorer in your browser.
  2. Open the developers console.
  3. To enable logs call localStorage.debug = '*'; from console. To disable logs call localStorage.debug = false; (see https://socket.io/docs/logging-and-debugging/)