###############################################################
配置 marathon 服務
###############################################################
Marathon:marathon是一個mesos框架,能夠支持運行長服務,比如web應用等。是集羣的分佈式Init.d,能夠原樣運行任何Linux二進制發佈版本,如Tomcat Play等等,可以集羣的多進程管理。也是一種私有的Pass,實現服務的發現,爲部署提供提供REST API服務,有授權和SSL、配置約束,通過HAProxy實現服務發現和負載平衡。
1:部署環境介紹:
服務器IP地址主機名安裝服務
172.16.7.12ctn-7-11.ptmind.com mesos-marathon
2:配置實例(172.16.7.12)
1、創建下他的配置文件的路徑(yum裝的沒給我們創建)
mkdir -p /etc/marathon/conf/ && touch hostname
2、創建集羣標示主機名
echo ctn-7-12.ptmind.com | sudo tee /etc/marathon/conf/hostname
按需配置服務端口,默認8080
cat <<EOF > http_port
7070
EOF
3:啓動服務,添加開機啓動
systemctl start marathon
systemctl status marathon
systemctl enable marathon
4:驗證
netstat -tunlp
tcp6 0 0 :::8080 :::* LISTEN 18919/java
訪問驗證:
瀏覽器輸入 http://ctn-7-12.ptmind.com:8080 即可看到marathon dashboard 界面。