How Do I upload executable to the environment and test changes - pivotal-cf/TAS-LTS GitHub Wiki
- Need to build each job which needed for testing, f.e:
cd src/cmd/log-storeorrouterornode-locatorand run the following command:env GOOS=linux GOARCH=amd64 go build -mod=vendor
- Copy binaries into
/tmp/folder of the specific VM, f.e:cd envs/creede/(in case of creede environment which is local for the Log Store)./cf_login(in case of creede environment, for others just login to that environment viacf logincommand)bosh scp -d deployment-name ~/workspace/log-store-release/src/cmd/log-store/log-store log-store/0:/tmp/
- ssh on the specific log-store VM where has been copied binary, f.e:
bosh -d deployment-name ssh log-store/0
- To become root, type
sudo -i - Keep old binary in
/tmp/foldercd /var/vcap/packages/log-store && cp log-store /tmp/log-store-old
- Move new binary into the right executable directory
cd /var/vcap/packages/log-store && mv /tmp/log-store ./
- Restart each job where done changes
monit restart log-store
After testing need to reset all changes
-
Put back binary
cd /var/vcap/packages/log-store && cp -rf /tmp/log-store-old ./log-store
-
Restart each job, where done changes
monit restart job-name
-
Remove all binaries that have been copied into
/tmp/cd /tmp/ && rm -rf log-store-old
-
Note: If necessary, exit the current shell via pressing
control+d -
Note: For more information about Log Store see Context doc