피드 구독

In this video

In his latest demo, Veer Muchandi explains how you can run different parts of your OpenShift projects in different components of your existing infrastructure.

Additional Notes

1. Setting the Default Node Selector for the OpenShift environment

OpenShift Administrator sets the default Node selectors for the entire OpenShift environment by editing

/etc/origin/master/master-config.yaml

Find the projectConfig section and add defaultNodeSelector as follows. This is a yaml file; so make sure that the indentation is right.

projectConfig:
defaultNodeSelector: "region=primary”
2. Setting the NodeSelector for specific project

OpenShift administrator sets the node selector for a specific project by editing the project namespace. As an example to edit namespace for a project named “new project”

# oc edit namespace newproject

Find the annotations section and add a node selector annotation as under. This is a yaml file; so make sure that the indentation is right.

  annotations:
openshift.io/node-selector: “region=secondary"
openshift.io/description: ""
openshift.io/display-name: ""
openshift.io/node-selector: “"

To override the default node selectors (that are set for the entire environment in #1 above), the administrator can set the above value as an empty string (“”) for a project namespace. In such projects the defaults won’t apply.

3. Adding NodeSelectors to a DeploymentConfig

A developer or a deployer can make specific components to deploy on specific nodes by adding node selectors to a deployment configuration.

#oc edit dc <deploymentConfigName> -o json

find the section “spec” under “template” and add node selector section

        "template": {
"metadata": {
"name": "mysql",
"creationTimestamp": null,
"labels": {
"name": "mysql"
}
},
"spec": {
"nodeSelector": {
"region": “primary"
},
4. Adding NodeSelectors to a Template

You can copy a template first

#oc get template <templatename> -n openshift > filename.json

Edit the json file and add the nodeselectors like how you did for the deployment configuration in #3 above. Also change the template name and namespace values in the metadata section at the beginning of the template.Save the json file.

Upload the template to your project by using

#oc create -f filename.json

Then you can start using the template.
 

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

인공지능

고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트

open hybrid cloud icon

오픈 하이브리드 클라우드

하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요

security icon

보안

환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보

edge icon

엣지 컴퓨팅

엣지에서의 운영을 단순화하는 플랫폼 업데이트

Infrastructure icon

인프라

세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보

application development icon

애플리케이션

복잡한 애플리케이션에 대한 솔루션 더 보기

Original series icon

오리지널 쇼

엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리