In this video

Today we continue with Veer Muchandi's series of 4 videos that will guide you through every detail you need to know to start building and running your own Microservices.

In the previous video we talked about how a developer creates microservices and how OpenShift builds the docker images for the microservices and deploys them. This video addresses how to package these microservices as units that can be deployed across environments.

OpenShift templates are used as a packaging format to group an entire microservice (including all tiers) together. Once packaged, we will see how we can use it to deploy each microservice a unit into a project.

Notes

1) Tagging the images in the development project

oc describe is

Copy hashtag (only the part that starts after project name.)

oc tag msdemo/:promote

This blog explains how to promote applications across environments https://blog.openshift.com/promoting-applications-across-environments/

2) Creating templates for each of the three microservices

oc export dc,svc,route -l microservice=userregsvc --as-template=userregsvc-microservice -o json > userregsvc-microservice.json
oc export dc,svc -l microservice=emailsvc --as-template=emailsvc-microservice -o json > emailsvc-microservice.json
oc export dc,svc,route -l microservice=userregfrontend --as-template=userreg-microservice -o json > userreg-microservice.json

Once created edit each microservice template to remove the host entries in the route and change the image trigger to use “promote” label instead of “latest” label. Also add a namespace label to pick up the image from your development project’s image stream.

3) Provide image puller access to the Production project and change to the production project

oc policy add-role-to-group system:image-puller system:serviceaccounts:msqa -n msdemo
oc project msprod

4) Deploy microservices in your production project

oc process -f emailsvc-microservice.json | oc create -f -
oc process -f userregsvc-microservice.json | oc create -f -
oc process -f userreg-microservice.json | oc create -f -

The Authors

This series of videos was created by Veer Muchandi in collaboration with Chakradhar Jonagam.

Chakradhar Jonagam works as a Solution Architect at Red Hat.
He helps companies architect their PaaS infrastructure, Prior to this he was a full stack developer with some infosec background. In his free time he loves to take long hikes.

You can find many of Veer's blog posts here. He has created a multitude of demos that cover interesting aspects of the OpenShift Platform.

You can also follow Veer's twitter account: @VeerMuchandi

Other Videos

View the Entire OpenShift 3 Demo Playlist

For the latest information on OpenShift 3, please visit enterprise.openshift.com.


关于作者

UI_Icon-Red_Hat-Close-A-Black-RGB

按频道浏览

automation icon

自动化

有关技术、团队和环境 IT 自动化的最新信息

AI icon

人工智能

平台更新使客户可以在任何地方运行人工智能工作负载

open hybrid cloud icon

开放混合云

了解我们如何利用混合云构建更灵活的未来

security icon

安全防护

有关我们如何跨环境和技术减少风险的最新信息

edge icon

边缘计算

简化边缘运维的平台更新

Infrastructure icon

基础架构

全球领先企业 Linux 平台的最新动态

application development icon

应用领域

我们针对最严峻的应用挑战的解决方案

Virtualization icon

虚拟化

适用于您的本地或跨云工作负载的企业虚拟化的未来