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

How to install Cloudify 3.1

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article is about how to install Cloudify 3.1. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

1. Prepare the environment ubuntu 12.04 LTS: for convenience, I found a small machine in linode with a minimum configuration of 1 gigabyte of memory for only $10 a month. Under the present circumstances, it is faster to choose the Tokyo computer room. The ping value is relatively small in the morning. When I apply for Tokyo machine in recent days, I may encounter the situation that I can't be allocated. Maybe the business is so good that I can only try it a few more times. Finally, I installed Cloudify3.1 CLI, plus Cloudify Manager, and its application example of MongoDB plus Node.js on a machine with 1GB of memory. In the end, it turned out to be successful, but at the last step, it did become very slow; so it is recommended to have more than 2 gigabytes of memory.

If it is Cloudify 3.1or ubuntu 12.04precise is recommended, if you have tried to install Cloudify 3.1in version 14.04, you will be prompted to report an error. For Cloudify 3.2 or later, 14.04 is recommended, because manager has only one option for Docker installation, although in theory you may upgrade the kernel yourself.

Root@localhost:~# cat / etc/issue Ubuntu 12.04.4 LTS\ n\ l

Root@localhost:~# uname-a Linux localhost 3.19.1-x86_64-linode53 # 1 SMP Tue Mar 10 15:30:28 EDT 2015 x86 "64 GNU/Linux

2. Add users and update components installation do not add a specified group to the user, it seems that there is a component that will cause problems, why I am also studying: useradd gary-d / home/gary-m-s / bin/bash

Add content to sudoers to have sudo function: vi / etc/sudoers gary ALL= (ALL) NOPASSWD: ALL

Then update the component installation (I feel that cd ~ is clearer than cd): su gary cd ~ sudo apt-get update & & sudo apt-get upgrade sudo apt-get install openjdk-7-jdk

Virtualenv is a python sandboxed environment and is a must for Cloudify: sudo apt-get install python-virtualenv & & sudo apt-get install python2.7-dev & & sudo apt-get install git

3. Prepare the key file sudo apt-get install openssh-client / usr/bin/ssh-keygen-t rsa for ssh

Add cd ~ / .ssh & & cat id_rsa.pub > > authorized_keys & & cd ~ to the key file in the .ssh directory

4. Create a sandboxie environment virtualenv cfy3.1 of python

Then activate it: source cfy3.1/bin/activate

At this point the which python command will appear as follows: which python (cfy3.1) gary@hostname:~$ which python / home/gary/cfy3.1/bin/python

5, the installation of Cloudify CLI begins to install Cloudify command line: pip install cloudify==3.1

Check the CLI version number: (cfy3.1) gary@li538-77 cfy $cfy-- version Cloudify CLI 3.1.0 (build: 85, date:)

6, bootstrap Cloudify manager git clone https://github.com/cloudify-cosmo/cloudify-manager-blueprints cd cloudify-manager-blueprints

Note that the CLI version is consistent with Manager, otherwise there will be errors for later versions. Git tag-l git checkout 3.1

Initialize the cloudify local working directory to install plug-ins. In a stand-alone environment, you will mainly install cloudify-fabric-plugin cd ~ & & cfy init cfy local install-plugins-p cloudify-manager-blueprints/simple/simple.yaml.

7, change the inputs.json file, after 3.2, the json file has been changed into a yaml file, meaning almost ~ / cloudify-manager-blueprints/simple there is a template, copy it to inputs.json.

Cd ~ / cloudify-manager-blueprints/simple & & cp inputs.json.template inputs.json vi inputs.json

{"public_ip": "127.0.0.1", "private_ip": "127.0.0.1", "ssh_user": "gary", "ssh_key_filename": "/ home/gary/.ssh/id_rsa"

"agents_user": "ubuntu", "resources_prefix": ""

}

Do not use ~ symbols, mess in the docker environment

The speed of cd ~ cfy bootstrap-p cloudify-manager-blueprints/simple/simple.yaml-I cloudify-manager-blueprints/simple/inputs.json is very slow. The download package exceeds 1G, and most of it is hosted under S3 of Amazon. It can be connected most of the time, but it is very slow, and a small amount of time is blocked. Change the file link in simple.yaml to make it faster. Openjdk-7-jdk installation error, https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1165292

Next, let's try to see if it works: (cfy3.1) gary@localhost:~$ cfy status Getting management services status... [ip=127.0.0.1]

Services: +-- +-+ | service | status | +-+-+ | Riemann | running | | Celery Managment | running | | RabbitMQ | running | | Cloudify Manager | running | | Elasticsearch | Running | | SSH | running | | Webserver | running | | Cloudify UI | running | | Syslog | running | | Logstash | running | +-- +-- Congratulations, brother. You have installed CLI and Manager. The next step is to launch the Nodejs+MangoDB wine bottle web service application. You can also open the page to enjoy: http://106.186.18.77/#/blueprints

8. Load nodecellar cd ~ git clone https://github.com/cloudify-cosmo/cloudify-nodecellar-example cd * le & & git checkout 3.1

Start loading the blueprints of the nodecellar application. Blueprints is the core of the Cloudify. This blueprint is all the details of application deployment and scaling monitoring. Cfy blueprints upload-b nodecellar- p ~ / cloudify-nodecellar-example/singlehost-blueprint.yaml will appear in the following content. You can also click on the web console page to see: Validating / home/feng/cloudify-nodecellar-example/singlehost-blueprint.yaml Blueprint validated successfully Uploading blueprint / home/feng/cloudify-nodecellar-example/singlehost-blueprint.yaml to management server 127.0.0.1 Uploaded blueprint, blueprint's id is: nodecellar

After we have blueprint, we also need to prepare the input parameter file: cd ~ / cloudify-nodecellar-example/inputs cp singlehost.json.template singlehost.json vi singlehost.json looks like this: {"host_ip": "127.0.0.1", "agent_user": "gary", "agent_private_key_path": "/ home/gary/.ssh/id_rsa"}

Then use blueprints to generate a deployments. Deployments is an instance of blueprints, similar to the relationship between class and object. Cfy deployments create-b nodecellar- d nodecellar--inputs ~ / cloudify-nodecellar-example/inputs/singlehost.json system hint is as follows: a deployments is generated from nodecellar's blueprints, and the deployment name is also called nodecellar (I don't think the same name is good, I'll change it next time): Creating new deployment from blueprint nodecellar at management server 127.0.0.1 Deployment created, deployment's id is: nodecellar

After that, we began to deploy the application on the local machine: cfy executions start-w install-d nodecellar

Then there is a long list of messages. If there is no error, you can open the wine bottle software, which is on port 8080 of that machine. Next, we have to stop, delete, and put it in openstack to do more interesting, right? Let's stop here first.

Thank you for reading! This is the end of this article on "how to install Cloudify 3.1". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

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

Servers

Wechat

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

12
Report