400 028 6601

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

ApacheStratos的安装与配置-创新互联

目录

创新互联建站,为您提供重庆网站建设公司成都网站制作、网站营销推广、网站开发设计,对服务成都广告推广等多个行业拥有丰富的网站建设及推广经验。创新互联建站网站建设公司成立于2013年,提供专业网站制作报价服务,我们深知市场的竞争激烈,认真对待每位客户,为客户提供赏心悦目的作品。 与客户共同发展进步,是我们永远的责任!

以下所有软件的OS环境均为Ubuntu14.04

1. 创建OpenStack镜像

# vi /etc/apt/source.list1

删除所有官方的镜像源,添加阿里云的镜像源,并执行apt-get update。

deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse12345
# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime1
# cd ~# mkdir .pip# cd .pip# vim pip.conf1234

添加并保存如下内容:

[global] index-url = http://pypi.douban.com/simple [install] trusted-host = pypi.douban.com1234
sudo -iapt-get install zip unzip
mkdir -p /root/bin
cd /root/bin
wget "https://git-wip-us.apache.org/repos/asf?p=stratos.git;a=blob_plain;f=tools/config-scripts/ec2/config.sh;hb=HEAD" -O config.sh
chmod +x config.sh
wget "https://git-wip-us.apache.org/repos/asf?p=stratos.git;a=blob_plain;f=tools/init-scripts/ec2/ubuntu/init.sh;hb=HEAD" -O init.sh
chmod +x init.sh
mkdir -p /root/bin/puppetinstall
wget "https://git-wip-us.apache.org/repos/asf?p=stratos.git;a=blob_plain;f=tools/puppet3-agent/puppetinstall/puppetinstall;hb=HEAD" -O puppetinstall/puppetinstall
chmod +x puppetinstall/puppetinstall
wget "https://git-wip-us.apache.org/repos/asf?p=stratos.git;a=blob_plain;f=tools/puppet3-agent/stratos_sendinfo.rb;hb=HEAD" -O stratos_sendinfo.rb
chmod +x stratos_sendinfo.rb12345678910111213

此处需要注意最后一步,官网的步骤中没有对stratos_sendinfo.rb赋可执行权限的操作。

sed -i 's:^TIMEZONE=.*$:TIMEZONE=\"Asia/Shanghai\":g' /root/bin/puppetinstall/puppetinstall1

2. 配置Puppet Master

node /tomcat/ inherits base {  $tomcat_version            = '8.0.36'
  $docroot = "/mnt/apache-tomcat-${tomcat_version}/webapps/"
  $samlalias="/mnt/apache-tomcat-${tomcat_version}/webapps/"

  class {'tomcat':}
}1234567

3. 运行Stratos

{
    "type": "java",
    "category": "framework",
    "provider": "oracle",
    "host": "leaptocloud.com",
    "displayName": "java",
    "description": "java Cartridge",
    "version": "7",
    "multiTenant": true,
    "portMapping": [
        {
            "name": "http-22",
            "protocol": "http",
            "port": 22,
            "proxyPort": 8280
        }
    ],
    "iaasProvider": [
        {
            "type": "openstack",
            "p_w_picpathId": "RegionOne/f8850fcb-a1a5-4288-a808-2c2a0b97adcb",
            "property": [
                {
                    "name": "instanceType",
                    "value": "RegionOne/2"
                }
            ],
            "networkInterfaces": [
                {
                    "networkUuid": "84eeb7b2-82f4-478a-b768-e24d7d0544ee"
                }
            ]        }
    ]}1234567891011121314151617181920212223242526272829303132333435

portMapping配置需要填正确的port配置。配置错误时,会出现applicaiton无法启动的问题。

4. Troubleshooting

# nohup /mnt/apache-stratos-python-cartridge-agent-/agent.py &1

并查看nohup日志进行调试运行。

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网站栏目:ApacheStratos的安装与配置-创新互联
路径分享:http://mzwzsj.com/article/eesjs.html

其他资讯

让你的专属顾问为你服务