2. Last Updated: 2014.9.29
Last Updated by: slee@pivotal.io schoi@pivotal.io
문서이력
버전 일자 이력사항 작성자
1.0 2014.09.05 문서초안 이상희
1.1 2014.09.29 세부 내역 추가 최승돈
3. 목차
문서이력 ............................................................................................................................. 2
System Configuration ..................................................................................................... 5
Software Download......................................................................................................... 5
Prerequisites.................................................................................................................... 6
Ops Manager 설치 ............................................................................................................ 9
Elastic Runtime 설치 ..................................................................................................... 18
Cloud Foundry CLI 설치 ................................................................................................ 26
Configure MySQL ........................................................................................................... 26
New Account 생성 / 설정 .............................................................................................. 27
HAProxy IP 설정 ............................................................................................................. 29
deploy 환경 설정 ............................................................................................................ 31
Appendix: References................................................................................................... 36
Appendix: Vmware operation manager 설치 ......................................................... 39
4. About This Documentation
본 문서는 Pivotal CF 1.2 의 설치 과정에 대해 기술한다. 본 문서는 공식적인
Pivotal 의 문서는 아니며, 에러를 포함할 수 있으므로, 실제 운영계 시스템의
설치시에는 반드시 공식 문서 http://docs.pivotal.io 를 참조하도록 한다.
본 문서의 작성에 참조한 사이트들은 다음과 같다.
1. vcenter 설치
- http://pivotallabs.com/worlds-smallest-iaas-part-1/
2. pcf 설치
- http://pivotallabs.com/worlds-smallest-iaas-part-2/
3. Configuring Elastic Runtime
- http://pivotallabs.com/worlds-smallest-iaas-part-3-paas/
4. pcf_docs
- http://docs.pivotal.io/pivotalcf/getstarted/index.html#system
5. System Configuration
Pivotal CF 설치 시에 필요한 IP list 들과 각 설정 사항들은 다음과 같다. 하기
내용은 내부 시스템에 한정하며, 고객사에 설치시는 네트워크 엔지니어와
협의하여 필요 IP 를 할당하여 진행하도록 한다.
내역 IP 참고
Vmware ESXi 10.35.106.178
Vmware vCenter 10.35.106.175 내부: 10.10.10.200
NAT 10.35.106.177:8443 PCF: 10.10.10.101:443
Gateway 10.10.10.254
Internal IP 10.10.10.102 ~ 199
Domain Pcftest175.com
HA Proxy 10.10.10.199
DNS 10.35.106.179 10.10.10.250
Software Download
다음의 사이트에서 PCF 설치 미디어를 다운받는다. 현재(2014.9.29) 최신 버전은
1.3 이며, 본 문서는 1.2 버전을 기준으로 설치하였다.
PCF download : http://network.pivotal.io
PCF document : http://docs.pivotal.io
Media 의 이름과 각 역할은 다음과 같다
- ova : Ops Manager
- cf-xxx.pivotal : CF
- P-mysql-xxx.pivotal = MySQL Service
7. * 주의 사항
1. pcf 설치시 iexplorer 가 아닌 다른 browser 에서 실행(eg:chrome)하기를 권고함.
Vcenter 설치
1. EXSI 설치
- 설치
- Network Device 추가 (구성>네트워킹, vmnetwork 로 추가 후 이름 변경
Internal ) : internal connection 을 위한 별도 가상 네트워크 구축
2. Vcenter 설치
- ESXi 서버 IP 를 등록해서 Vcenter. ova 파일 deploy
8. 3. Vcenter 설치 후에 network device 추가
- 시스템 부팅
- root / vmware
- IP 할당
# yast
. 탭으로 옮김
. ip 할당
. gateway (routing)
# 추가 device 설정
. internal
- vcenter EUL
https://IP:5480
- Network Device 추가
. Internal
- vcenter 활성화
- data center 생성
- 클러스터 생성
9. - 클러스터 생성 후 호스트 추가(esxi 서버 추가) --참고 사이트 1. vcenter 참조
- vcenter 웹클라이언트
https://10.35.106.175:9443/vsphere-client/
에서 vSphere Client 를 다운받아 설치 후 접속한다.
Ops Manager 설치
.
vSphere Client 에서 File OVF Template 배포 를 시작한다
26. Cloud Foundry CLI 설치
인터넷이 연결된 환경이라면 Developer Console 상의 Tool 메뉴에서, 인터넷이
연결되지 않았다면 하기의 사이트에서 Client OS 에 알맞은 CLI 툴을 다운받도록
한다.
https://github.com/cloudfoundry/cli/releases
Configure MySQL
Ops Manager 에서 MySQL 서비스를 설치한다.
Import 후 Add 클릭.
27. Apply Change, Ignore CPU Core 에러할것.
New Account 생성 / 설정
- 웹 push 를 위한 계정 생성 (테스트시에는 필요 없음, admin 으로 처리)
28.
29. HAProxy IP 설정
외부 서비스 연결을 위해서 HA Proxy 상에 External IP 를 설정한다.
vCenter 서버 리스트중에서 HA Proxy Job 을 담당하는 서버를 확인하여 접속한다.
31. Root 로 접속하여 /etc/network/interface 에 external ip 를 기술하고 network
restart 하여 적용 사항을 반영시킨다.
확인
deploy 환경 설정
# Client (개인 PC)에 host (haproxy) 추가
# 여기서는 별도의 외부 DNS 가 없으므로 client 내의 hosts 파일로 요청 URL 에
대한 naming resolution 을 처리한다. App 이 등록될 때마다 subdomain 을 hosts
파일에 기술하여야 한다.
koxxlees55m1:~ lees55$ sudo vi /etc/hosts
Password:
32. 127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
10.35.106.179 api.pcftest175.com
10.35.106.179 login.pcftest175.com
10.35.106.179 console.pcftest175.com
10.35.106.179 loggregator.pcftest175.com
10.35.106.179 orders.pcftest175.com
10.35.106.179 music.pcftest175.com
## cf login 시 패스워드 확인
## cf login
koxxlees55m1:~ lees55$ cf api api.pcftest175.com
Setting api endpoint to api.pcftest175.com...
FAILED
Invalid SSL Cert for api.pcftest175.com
TIP: Use 'cf api --skip-ssl-validation' to continue with an insecure API
endpoint
koxxlees55m1:~ lees55$ cf api --skip-ssl-validation api.pcftest175.com
Setting api endpoint to api.pcftest175.com...
OK
API endpoint: https://api.pcftest175.com (API version: 2.2.0)
Not logged in. Use 'cf login' to log in.
33. koxxlees55m1:~ lees55$ cf login -u push_console -p
8b58f95707888d4c05f1
API endpoint: https://api.pcftest175.com
Authenticating...
OK
Select an org (or press enter to skip):
1. system
2. pivotal_kr
Org> 2
Targeted org pivotal_kr
Targeted space development
API endpoint: https://api.pcftest175.com (API version: 2.2.0)
User: push_console
Org: pivotal_kr
Space: development
koxxlees55m1:~ lees55$ pwd
Push 테스트
[root@nat pcf]# cf push Orders -i 1 -m 512M -p pcfdemo.war
Creating app Orders in org pivotal_kr / space development as push_console...
OK
Creating route orders.pcftest175.com...
OK
Binding orders.pcftest175.com to Orders...
OK
Uploading Orders...
Uploading app files from: pcfdemo.war
Uploading 10.9M, 96 files
OK
Starting app Orders in org pivotal_kr / space development as push_console...
OK
-----> Downloaded app package (8.4M)
34. -----> Java Buildpack Version: v2.1.2 (offline) |
https://github.com/cloudfoundry/java-buildpack.git#074fd9a
-----> Downloading Open Jdk JRE 1.7.0_55 from
http://download.run.pivotal.io/openjdk/lucid/x86_64/openjdk-1.7.
0_55.tar.gz (found in cache)
Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.3s)
-----> Downloading Spring Auto Reconfiguration 0.8.9 from
http://download.run.pivotal.io/auto-reconfiguration/
auto-reconfiguration-0.8.9.jar (found in cache)
Modifying /WEB-INF/web.xml for Auto Reconfiguration
-----> Downloading Tomcat Instance 7.0.53 from
http://download.run.pivotal.io/tomcat/tomcat-7.0.53.tar.gz (fou
nd in cache)
Expanding Tomcat to .java-buildpack/tomcat (0.1s)
-----> Downloading Tomcat Lifecycle Support 2.1.0_RELEASE from
http://download.run.pivotal.io/tomcat-lifecycle -
support/tomcat-lifecycle-support-2.1.0_RELEASE.jar (found in cache)
-----> Downloading Tomcat Logging Support 2.1.0_RELEASE from
http://download.run.pivotal.io/tomcat-logging-sup
port/tomcat-logging-support-2.1.0_RELEASE.jar (found in cache)
-----> Uploading droplet (47M)
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running
App started
Showing health and status for app Orders in org pivotal_kr / space
development as push_console...
OK
requested state: started
instances: 1/1
usage: 512M x 1 instances
urls: orders.pcftest175.com
state since cpu memory disk
#0 running 2014-09-02 12:33:07 PM 0.0% 365.4M of 512M 108.1M of
35. 1G
[root@nat pcf]# cf services
Getting services in org pivotal_kr / space development as push_console...
OK
No services found
[root@nat pcf]#
## 웹 콘솔에서 확인
Web application 확인
37. koxxlees55m1:PCF_Certi lees55$ c f apps
Getting apps in org pivotal_kr / space development as push_console...
OK
name requested state instances memory disk urls
Music started 1/1 512M 1G music.pcftest175.com
Orders started 2/2 512M 1G orders.pcftest175.com
koxxlees55m1:PCF_Certi lees55$ c f scale orders --i 5 -m 512M
This will cause the app to restart. Are you sure you want to scale Orders?> y
Scaling app Orders in org pivotal_kr / space development as push_console...
OK
Stopping app Orders in org pivotal_kr / space development as push_console...
OK
Starting app Orders in org pivotal_kr / space development as push_console...
OK
0 of 5 instances running, 5 starting
….
38. 0 of 5 instances running, 4 starting, 1 down
0 of 5 instances running, 5 starting
1 of 5 instances running, 4 starting
App started
Showing health and status for app Orders in org pivotal_kr / space development as
push_console...
OK
requested state: started
instances: 5/5
usage: 512M x 5 instances
urls: orders.pcftest175.com
state since cpu memory disk
#0 starting 2014-09-02 04:49:41 PM 0.0% 0 of 0 0 of 0
#1 starting 2014-09-02 04:49:41 PM 0.0% 0 of 0 0 of 0
#2 starting 2014-09-02 04:49:41 PM 0.0% 0 of 0 0 of 0
#3 running 2014-09-02 04:50:05 PM 0.0% 333.8M of 512M 108.1M of 1G
#4 starting 2014-09-02 04:50:01 PM 0.0% 0 of 0 0 of 0
koxxlees55m1:PCF_Certi lees55$ cf apps
Getting apps in org pivotal_kr / space development as push_console...
OK
name requested state instances memory disk urls
Music started 1/1 512M 1G music.pcftest175.com
Orders started 5/5 512M 1G orders.pcftest175.com
koxxlees55m1:PCF_Certi lees55$ c f scale orders --i 1 -m 512M
This will cause the app to restart. Are you sure you want to scale Orders?> y
Scaling app Orders in org pivotal_kr / space development as push_console...
OK
Stopping app Orders in org pivotal_kr / space development as push_console...
OK
Starting app Orders in org pivotal_kr / space development as push_console...
OK
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running
App started
Showing health and status for app Orders in org pivotal_kr / space development as
39. push_console...
OK
requested state: started
instances: 1/1
usage: 512M x 1 instances
urls: orders.pcftest175.com
state since cpu memory disk
#0 running 2014-09-02 04:53:24 PM 0.0% 334.1M of 512M 108.1M of 1G
koxxlees55m1:PCF_Certi lees55$
Appendix: Vmware operation manager 설치
설치 파일 : appliance 으로 설치
VMware-vcops-5.8.2.0-1885282-vapp.ova
필요한 사항 : IP 두 개 필요