2. Purpose
● Direct Impact
○ Reduce the needs to have surrounding system on local
○ Reduce the need for creating mock service and/or mock object
○ Integration and Integration test can be done earlier
● Indirect Impact
○ Emerge developer with it cluster workspace
○ Shift left development process, cut development time
3. ● Hot Deploy not replacing standard deploy, it’s a complementer
● Hot Deploy not deploying other than to development namespace on
development cluster (with exception)
Disclaimer
Development SIT UAT Production
Development Staging Production
4. Assumption
1. Application Architecture :
○ Single front-end layer, not splitted to some services
○ Multi back-end services
○ Behind reverse proxy to join all the service into single entry point
2. Technology :
○ It’s not limited to angular and spring boot service
○ But, this presentation only cover angular and spring boot only
5. Method
1. Local change, and application on cloud will be mirrored
○ Hot Deploy to Cluster
○ It’s perfect for backend services
2. Local application, and keep surrounding on the cloud
○ Hot Deploy on Local
○ It’s good for frontend
3. Combination
○ Hot Deploy on Local and Cloud
○ It’ good for pairing development (dev & qa)
6. Method 1 : local change, cloud mirror
rest service : boot
rest service : bootreverse proxy : nginx rest service : boot rest service : boot
dev browser dev ide
File Sync : OCP
web ui : angular
7. Method 2 : local change, cloud surrounding
reverse proxy : nginx web ui : angular
rest service : bootreverse proxy : nginx rest service : boot rest service : boot
dev browser dev ide
Port Forwarder : OCP
8. Method 3 : combination
reverse proxy : nginx web ui : angular
rest service : bootreverse proxy : nginx rest service : boot rest service : boot
dev browser dev ide
Port Forwarder : OCP
web ui : angular
File Sync : OCP
qa browser
Advantage
Local changes directly affected to the cluster
Disadvantage
10 second delay per changes
Require 5 second to upload
And other 5 second to reload
Require restart pods when error happen
Require standard deployment to apply new library
Require to have separate deployment (pods) per developer when concurrent development happen
Requirement
oc client with cluster access
Preparation
set cmd / entry point
ng serve --open
deploy (standard deploy)
rsync local source code with oc client to target pod
oc project ${project} : go to target project
oc get pods : find out target pod
oc src : go to source folder
oc rsync . ${target-pod}:/${src-directory} --watch
Additional
oc logs ${target-pod} --follow