OpenShift nodejs container 실행 테스트
페이지 정보
작성자 꿈꾸는여행자 작성일 21-01-06 10:34 조회 7,987 댓글 0본문
안녕하세요.
Redhat에서 제공하는 nodejs image를 Container 테스트 현황을 아래와 같이 공유 합니다.
OKD에서도 해당 Image를 사용하면 그대로 구현 가능할 것이라고 생각 됩니다.
1) Test 1
설계
nodejs Test
https://docs.openshift.com/container-platform/3.11/using_images/s2i_images/nodejs.html
Git
Clone
upload on gogs
Image 준비
Template Test
Guide
Ref
Easily deploy Node.js applications to Red Hat OpenShift using Nodeshift
https://developers.redhat.com/blog/2019/08/30/easily-deploy-node-js-applications-to-red-hat-openshift-using-nodeshift/
Deploy a 3-tier Node.js app on Red Hat OpenShift
https://developers.redhat.com/articles/deploy-a-NodeJS-app-OpenShift
Node.js
https://docs.openshift.com/container-platform/3.11/using_images/s2i_images/nodejs.html
Container images
https://access.redhat.com/containers/
node js
2) Test 2
설계
template nodejs.json
https://github.com/sclorg/nodejs-ex/blob/master/openshift/templates/nodejs.json
Run Your Nodejs projects on OpenShift in Two Simple Steps
https://www.openshift.com/blog/run-your-nodejs-projects-on-openshift-in-two-simple-steps
실행
nodejs
https://docs.openshift.com/container-platform/3.11/using_images/s2i_images/nodejs.html
Images
Search
https://access.redhat.com/containers/
node js
https://catalog.redhat.com/software/containers/rhscl/nodejs-12-rhel7/5da02401bed8bd2245d95cae
Check image
< On Master
oc get is -n openshift nodejs
oc describe -n openshift is nodejs
nodejs:12
Download
< On Bastion
RHEL 7 Based Images
< Pull a base builder image to build on
docker pull registry.redhat.io/rhscl/nodejs-12-rhel7:1-24
docker tag registry.redhat.io/rhscl/nodejs-12-rhel7:1-24 \
dpaasbas1v.example.com:5000/example/nodejs-12-rhel7:1-24
docker tag registry.redhat.io/rhscl/nodejs-12-rhel7:1-24 \
dpaasbas1v.example.com:5000/example/nodejs-12-rhel7:latest
docker push dpaasbas1v.example.com:5000/example/nodejs-12-rhel7:1-24
Upload
< On Master
oc import-image nodejs:12 -n openshift --confirm \
--from='dpaasbas1v.example.com:5000/example/nodejs-12-rhel7:1-24' \
--insecure=true
oc delete is nodejs:10 -n openshift
oc import-image nodejs:10 -n openshift --confirm \
--from='dpaasbas1v.example.com:5000/example/nodejs-12-rhel7:1-24' \
--insecure=true
Build Process
Note
Starts a container from the builder image.
Downloads the application source.
Streams the scripts and application sources into the builder image container.
Runs the assemble script (from the builder image).
Saves the final image.
Prepare source
< Pull an application code
github
download source
< On Bastion Node
https://github.com/sclorg/nodejs-ex.git
wget https://github.com/sclorg/nodejs-ex/archive/master.zip
scp /tmp/master.zip dpaasmst2v.example.com:/tmp/
Template
Check
oc get template -n openshift
Create
mkdir ~/Documents/Work/20201201_nodejs/template
cd ~/Documents/Work/20201201_nodejs/template
vi nodejs-example.json
https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json
%s/nodejs-example/nodejs-example/g
oc create -n openshift -f nodejs-example.json
oc get template -n openshift nodejs-example
oc edit template -n openshift nodejs-example
oc get template -n openshift nodejs-example --export -o yaml \
> template-nodejs-example.yml
3) Test 3
실행
< 성공
Application Test
Create App
Webconsole > Search Catalog < nodejs
example nodejs
Information
Next
Configuration
Name : nodejs-12-test01
Namespace : openshift
Version of NodeJS Image : 12
Git Repository URL : https://github.com/sclorg/nodejs-ex.git
Create
Results
Close
Create Secret
Webconsole > Resources > Secret > Create Secret
Secret Type : Source Secret
Secret Name : nodejs-12-test01-git-secret
Authentication Type : Basic Authentication
Username : example
Passwor or Token : example
Edit Build
Webconsole > Builds > Select Builds
Actions > Edit
Source Configuration
Source Secret : nodejs-12-test01-git-secret
Ref
Nodejs와 Tomcat의 차이점
https://www.python2.net/questions-84274.htm
Managing Node.js - Express Sessions with Redis
https://medium.com/mtholla/managing-node-js-express-sessions-with-redis-94cd099d6f2f
Anatomy of NodeJS and Apache
https://medium.com/swlh/anatomy-of-nodejs-and-apache-9ac173d4a0f8
Redhat에서 제공하는 nodejs image를 Container 테스트 현황을 아래와 같이 공유 합니다.
OKD에서도 해당 Image를 사용하면 그대로 구현 가능할 것이라고 생각 됩니다.
1) Test 1
설계
nodejs Test
https://docs.openshift.com/container-platform/3.11/using_images/s2i_images/nodejs.html
Git
Clone
upload on gogs
Image 준비
Template Test
Guide
Ref
Easily deploy Node.js applications to Red Hat OpenShift using Nodeshift
https://developers.redhat.com/blog/2019/08/30/easily-deploy-node-js-applications-to-red-hat-openshift-using-nodeshift/
Deploy a 3-tier Node.js app on Red Hat OpenShift
https://developers.redhat.com/articles/deploy-a-NodeJS-app-OpenShift
Node.js
https://docs.openshift.com/container-platform/3.11/using_images/s2i_images/nodejs.html
Container images
https://access.redhat.com/containers/
node js
2) Test 2
설계
template nodejs.json
https://github.com/sclorg/nodejs-ex/blob/master/openshift/templates/nodejs.json
Run Your Nodejs projects on OpenShift in Two Simple Steps
https://www.openshift.com/blog/run-your-nodejs-projects-on-openshift-in-two-simple-steps
실행
nodejs
https://docs.openshift.com/container-platform/3.11/using_images/s2i_images/nodejs.html
Images
Search
https://access.redhat.com/containers/
node js
https://catalog.redhat.com/software/containers/rhscl/nodejs-12-rhel7/5da02401bed8bd2245d95cae
Check image
< On Master
oc get is -n openshift nodejs
oc describe -n openshift is nodejs
nodejs:12
Download
< On Bastion
RHEL 7 Based Images
< Pull a base builder image to build on
docker pull registry.redhat.io/rhscl/nodejs-12-rhel7:1-24
docker tag registry.redhat.io/rhscl/nodejs-12-rhel7:1-24 \
dpaasbas1v.example.com:5000/example/nodejs-12-rhel7:1-24
docker tag registry.redhat.io/rhscl/nodejs-12-rhel7:1-24 \
dpaasbas1v.example.com:5000/example/nodejs-12-rhel7:latest
docker push dpaasbas1v.example.com:5000/example/nodejs-12-rhel7:1-24
Upload
< On Master
oc import-image nodejs:12 -n openshift --confirm \
--from='dpaasbas1v.example.com:5000/example/nodejs-12-rhel7:1-24' \
--insecure=true
oc delete is nodejs:10 -n openshift
oc import-image nodejs:10 -n openshift --confirm \
--from='dpaasbas1v.example.com:5000/example/nodejs-12-rhel7:1-24' \
--insecure=true
Build Process
Note
Starts a container from the builder image.
Downloads the application source.
Streams the scripts and application sources into the builder image container.
Runs the assemble script (from the builder image).
Saves the final image.
Prepare source
< Pull an application code
github
download source
< On Bastion Node
https://github.com/sclorg/nodejs-ex.git
wget https://github.com/sclorg/nodejs-ex/archive/master.zip
scp /tmp/master.zip dpaasmst2v.example.com:/tmp/
Template
Check
oc get template -n openshift
Create
mkdir ~/Documents/Work/20201201_nodejs/template
cd ~/Documents/Work/20201201_nodejs/template
vi nodejs-example.json
https://raw.githubusercontent.com/sclorg/nodejs-ex/master/openshift/templates/nodejs.json
%s/nodejs-example/nodejs-example/g
oc create -n openshift -f nodejs-example.json
oc get template -n openshift nodejs-example
oc edit template -n openshift nodejs-example
oc get template -n openshift nodejs-example --export -o yaml \
> template-nodejs-example.yml
3) Test 3
실행
< 성공
Application Test
Create App
Webconsole > Search Catalog < nodejs
example nodejs
Information
Next
Configuration
Name : nodejs-12-test01
Namespace : openshift
Version of NodeJS Image : 12
Git Repository URL : https://github.com/sclorg/nodejs-ex.git
Create
Results
Close
Create Secret
Webconsole > Resources > Secret > Create Secret
Secret Type : Source Secret
Secret Name : nodejs-12-test01-git-secret
Authentication Type : Basic Authentication
Username : example
Passwor or Token : example
Edit Build
Webconsole > Builds > Select Builds
Actions > Edit
Source Configuration
Source Secret : nodejs-12-test01-git-secret
Ref
Nodejs와 Tomcat의 차이점
https://www.python2.net/questions-84274.htm
Managing Node.js - Express Sessions with Redis
https://medium.com/mtholla/managing-node-js-express-sessions-with-redis-94cd099d6f2f
Anatomy of NodeJS and Apache
https://medium.com/swlh/anatomy-of-nodejs-and-apache-9ac173d4a0f8
댓글목록 0
등록된 댓글이 없습니다.