1.1 Apache CloudStack 4.1 + Maven 기반 설치
참조: http://incubator.apache.org/cloudstack/develop/environment.html
Dependancy: git, maven, mkisofs, python2.7
easy_install mysql-connector-python apt-get install git apt-get install maven apt-get install genisoimage ln –s /usr/bin/genisoimage /usr/bin/mkisofs apt-get install python-setuptools |
debian에서 python2.6을 python2.7로 변경
http://www.stylesen.org/python_27_debian_squeeze_60
o Debian 6에서 설치
¡ Git을 활용하여 소스코드를 다운로드 받음
Git 환경설정 업데이트
[root@cloudstack ~]# git config --global user.name "Choonho Son" [root@cloudstack ~]# git config --global user.email "choonho.son@gmail.com" |
/root/.gitconfig 파일의 내용이 업데이트 됨
[root@cloudstack ~]# cat .gitconfig [user] name = Choonho Son email = choonho.son@gmail.com |
git을 통해서 소스를 다운로드 (최초 1회는 전체소스를 다운로드 받기 때문에 오래 걸림)
[root@cloudstack ~]# git clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git Cloning into 'incubator-cloudstack'... remote: Counting objects: 194813, done. remote: Compressing objects: 100% (35777/35777), done. remote: Total 194813 (delta 138151), reused 189896 (delta 133918) Receiving objects: 100% (194813/194813), 287.28 MiB | 269 KiB/s, done. Resolving deltas: 100% (138151/138151), done. |
개발을 위해서 다운로드 받은 소스에서 branch를 만듬
예제는 ovm이라는 태그로 branch를 만듬
[root@cloudstack ~]# cd incubator-cloudstack/ [root@cloudstack incubator-cloudstack]# git checkout -b ovm Switched to a new branch 'ovm' |
Branch를 확인하려면 git branch 명령어를 통해서 가능
[root@cloudstack incubator-cloudstack]# git branch master * ovm |
¡ OpenJDK 설치
설치 가능한 jdk 버전을 확인 후 jdk-devel 설치
[root@cloudstack ~]# yum search openjdk
java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle
[root@cloudstack ~]# yum install java-1.6.0-openjdk-devel.x86_64 |
¡ 아파치 톰캣6 설치
톰캣 소스 압축 해제
[root@cloudstack ~]# tar zxvf apache-tomcat-6.0.33.tar.gz –C /usr/local |
/root/.bashrc 파일에 톰캣 환경 설정 추가
export CATALINA_HOME=/usr/local/apache-tomcat-6.0.33/ export CATALINA_BASE=/usr/local/apache-tomcat-6.0.33/ |
¡ Mysql-server 설치
[root@cloudstack ~]# apt-get install mysql-server |
¡ CloudStack 소스 컴파일
[root@cloudstack incubator-cloudstack]# pwd /root/incubator-cloudstack [root@cloudstack incubator-cloudstack]# mvn –P deps |
컴파일이 성공하면 다음과 같이 결과가 나옴
[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Apache CloudStack ................................. SUCCESS [3.678s] [INFO] Apache CloudStack Utils ........................... SUCCESS [6.837s] [INFO] Apache CloudStack API ............................. SUCCESS [2.589s] [INFO] Apache CloudStack Core ............................ SUCCESS [1.602s] [INFO] Apache CloudStack Agents .......................... SUCCESS [3.687s] [INFO] Apache CloudStack SystemVM Patches ................ SUCCESS [1.388s] [INFO] Apache CloudStack Console Proxy ................... SUCCESS [4.980s] [INFO] Apache CloudStack Server .......................... SUCCESS [44.275s] [INFO] Apache CloudStack Usage Server .................... SUCCESS [3.676s] [INFO] Apache XenSource XAPI ............................. SUCCESS [9.334s] [INFO] Apache CloudStack Plugin POM ...................... SUCCESS [0.209s] [INFO] Apache CloudStack Plugin - User Concentrated Pod Deployment Planner SUCCESS [2.310s] [INFO] Apache CloudStack Plugin - User Dispersing Deployment Planner SUCCESS [2.103s] [INFO] Apache CloudStack Plugin - Host Allocator Random .. SUCCESS [2.128s] [INFO] Apache CloudStack Plugin - Hypervisor OracleVM .... SUCCESS [3.652s] [INFO] Apache CloudStack Plugin - Open vSwitch ........... SUCCESS [2.682s] [INFO] Apache CloudStack Plugin - Hypervisor Xen ......... SUCCESS [7.249s] [INFO] Apache CloudStack Plugin - Hypervisor KVM ......... SUCCESS [15.154s] [INFO] Apache CloudStack Plugin - Network Elastic Load Balancer SUCCESS [3.830s] [INFO] Apache CloudStack Plugin - Network Nicira NVP ..... SUCCESS [4.513s] [INFO] Apache CloudStack Plugin - Storage Allocator Random SUCCESS [2.534s] [INFO] Apache CloudStack Plugin - User Authenticator LDAP SUCCESS [2.273s] [INFO] Apache CloudStack Plugin - User Authenticator MD5 . SUCCESS [2.507s] [INFO] Apache CloudStack Plugin - User Authenticator Plain Text SUCCESS [2.056s] [INFO] Apache CloudStack Plugin - User Authenticator SHA256 Salted SUCCESS [3.865s] [INFO] Apache CloudStack AWS API Bridge .................. SUCCESS [2:26.756s] [INFO] Apache CloudStack Client UI ....................... SUCCESS [32.045s] [INFO] Apache CloudStack Test ............................ SUCCESS [15.367s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5:34.210s [INFO] Finished at: Wed Nov 14 11:21:55 KST 2012 [INFO] Final Memory: 25M/72M [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "deps" could not be activated because it does not exist. |
¡ 소스 빌드
[root@cloudstack incubator-cloudstack]# mvn -P developer clean install |
¡ 소스 deploy
vi /root/incubator-cloudstack/utils/conf/db.properties 편집
db.root.password=<mysql root 비밀번호> |
mvn -P developer -pl developer,tools/devcloud –Ddeploydb |
¡ db deploy
mvn -P developer -pl tools/devcloud -Ddeploysvr |
¡ cloudstack 실행
mvn -pl :cloud-client-ui jetty:run |
¡ 접속 확인
http://<설치한 서버 IP>:8080/client 로 접속 확인
admin/password 로 로긴 가능