Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and configuration of Apache Stratos

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Catalogue

Create an OpenStack image

Configure Puppet Master

Run Stratos

Troubleshooting

The OS environment of all of the following software is Ubuntu14.04

1. Create an OpenStack image

Make the basic image Ubuntu14.04 of OpenStack

Reference: Step 1-Spawn an instance

Start virtual

Modify mirror source

# vi / etc/apt/source.list1

Delete all official mirror sources, add Aliyun's mirror sources, and execute apt-get update.

Deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiversedeb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse12345

Change the time zone to China time zone, and the time of Puppet Master and Agent are completely synchronized, otherwise there will be no normal communication.

# cp / usr/share/zoneinfo/Asia/Shanghai / etc/localtime1

Modify the Python source to the source provided by Douban in China, otherwise there will be a timeout when configuring cartridge in the image creation step. The error message is: pip installs-gittle timeout.

# cd ~ # mkdir .pip # cd .pip # vim pip.conf1234

Add and save the following:

[global] index-url = http://pypi.douban.com/simple [install] trusted-host = pypi.douban.com1234

Execute the following command to configure Cartriage

Sudo-iapt-get install zip unzipmkdir-p / root/bincd / root/binwget "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.shchmod + x config.shwget" 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.shchmod + x init.shmkdir-p / root/bin/puppetinstallwget" https://git-wip-us.apache.org/repos/asf?p=stratos.git;a=blob_plain;f=tools/puppet3-agent/puppetinstall/puppetinstall;hb=HEAD"-O puppetinstall/puppetinstallchmod + x puppetinstall/puppetinstallwget "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.rbchmod + x stratos_sendinfo.rb12345678910111213

It should be noted here that the last step is that there is no executable permission for stratos_sendinfo.rb in the steps on the official website.

The setting time is consistent with that of Puppet Master

Sed-I's: ^ Timesone =. * $: TIMEZONE=\ "Asia/Shanghai\": G' / root/bin/puppetinstall/puppetinstall1

Run the config.sh file, where the service-name can enter default or no value. If you enter php, the php configuration will fail during the run, which may be due to errors in the puppet script. (php has just been configured to access ip:80, but it cannot be accessed after cartriage agent has been run. The startup state of Stratos Application stays at starting because the program accesses port 80 but does not respond.

two。 Configure Puppet Master

Refer to the official website step: 6. Setup Puppet Master

When configuring the contents of the base.pp file, it needs to be consistent with the definition of other resources in the nodes directory. For example, if the variable $tomcat_version is defined in the base.pp directory, the contents in the / etc/puppet/manifests/nodes/tomcat.pp directory need to correspond to it, so that the file can be pushed correctly.

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':}} 12345673. Run Stratos

Start Stratos

Debug runtime can start H2 database, even built-in CEP.

Create each Stratos object

The code to create the Cartridge is as follows:

{"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"]}]} 1234567891011121314151617181920212232425272829303132333435

The portMapping configuration needs to be filled in the correct port configuration. The problem that applicaiton cannot be started occurs when the configuration is wrong.

4. Troubleshooting

You can view the syslog log when Cartridge agent is running. If it fails to start normally or fails to start, you can manually delete the python agent. After modifying the configuration, run the agent program again:

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

And check the nohup log to debug and run.

Debug critical path

/ root/bin/puppetinstall

/ tmp/payload/launch-params

/ root/bin/puppetinstall/puppetinstall

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report