Apache Stratos的安装与配置

发布时间:2020-07-17 11:42:26 作者:糖在兜兜里
来源:网络 阅读:319

目录

以下所有软件的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日志进行调试运行。



推荐阅读:
  1. Apache网页压缩与缓存
  2. Apache优化之apache网页压缩

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

update 阿里云 restricted

上一篇:解析对比JAVA和PYTHON的质数计算代码

下一篇:shell 循环 函数 数组 if 检测文件 判断数字大小

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》