[bosh] release, job

CloudFoundry 2016. 6. 2. 15:49

BOSH는 VM 내부의 SW 배포에 필요한 설치 파일/script/소스등의 모음 인 release라는 파일을 통해 Deploy를 수행합니다.



물론 그 과정에 Manifest라는 파일과 stemcell 이미지가 필요하지만요...


BOSH release 구성요소는 다음과 같습니다


1) Jobs describe pieces of the service or application you are releasing

2) Packages provide source code and dependencies to jobs

3) Source provides packages the non-binary files they need

4) Blobs provide packages the binaries they need, other than binaries that are checked into a source code repository


1. Release 생성


# bosh init release <release_name>

아래와 같이 Release의 기본 구조가 만들어짐

├── blobs

├── config

   └── blobs.yml

├── jobs

├── packages

└── src


2. jobs 생성


Release job 수행 work 묶음

예를 들어 dhcp Release라고 하면 dhcp_server job 있을테고 APM Release 라면 apache, mysql, php 설치/설정하는 3가지의 job으로 나눌 있지 않을까 싶다

 

아래 명령어로 job을 만들게 되면 아래 구조로 각각의 job의 골격이 만들어진다

# bosh generate job <job_name>


create        jobs/job_one

create        jobs/job_one/templates

create        jobs/job_one/spec

create        jobs/job_one/monit

 

jobs

   ├── job_one

   │   ├── monit

   │   ├── spec

   │   └── templates

   │       └── pre-start.sh.erb

   └── job_two

       ├── monit

       ├── spec

       └── templates


여기서

spec : spec 파일은 job metadata 정의한 파일로 bosh 통해 deploy 해석되어 사용된다

         name, description, templates, package, properties 구성 되어 있음

         spec 파일의 자세한 schema https://bosh.io/docs/jobs.html 참조

 

Templates : (ERB 기반의 Configuration file)

                Bosh에서 배포 파일의 Template 역할을 하는 기반임

                Monit에서 사용하는 ctl 파일이나 Hook scripts(pre-start, post-start, post-deploy)  

                참조  가 되는 디렉토리 또한 ERB 파일이기때문에 Basic ERB syntax 이용가능함

  • <%= "value" %>: Inserts string “value”.
  • <% expression %>: Evaluates expression but does not insert content into the template. Useful for if/else/end statements.

<%= p("some.property") %>: Insert the property some.property value, else a default 

 

Monit : process pid 정보와 start, stop 스크립트를 명시한 파일

          monit 설정을 ㅗㅇ해 bosh 해당 job 상태를 체크하고 점검함

Posted by 뭉탁거림
,

spring boot 시작

Study 2016. 5. 26. 13:16

mvn -B archetype:generate -DgroupId=com.example -DartifactId=hajiboot -Dversion=1.0.0-SNAPSHOT -DarchetypeArtifactId=maven-archetype-quickstart

'Study' 카테고리의 다른 글

Validation / verification  (0) 2015.02.05
Network Strorage(DAS/NAS/SAN)  (1) 2014.04.02
VLAN(Virutal LAN) 개념정리  (0) 2014.03.11
Posted by 뭉탁거림
,

SLA

나만의 Cloud 2016. 5. 9. 10:54

SLA 지표 


출처 : https://ophir.wordpress.com/2011/01/31/does-sla-really-mean-anything/

'나만의 Cloud' 카테고리의 다른 글

ubuntu 14.04 haproxy 설정  (0) 2016.11.15
ubuntu apache2 포트 변경 및 DocumentRoot 변경  (0) 2016.06.02
ubuntu keepalived  (0) 2016.04.20
ansible 설치 및 기본 구성  (0) 2015.08.21
Virtual box Vagrant  (0) 2015.07.09
Posted by 뭉탁거림
,