Build your own PaaS System Using Tsuru and Docker

Source: Internet
Author: User
Tags install redis dns forwarder

This document describes how to use Tsuru and Docker to build your own private PaaS service.

This document assumes that you have installed Tsuru on 64-bit Ubuntu 12.04 LTS.

New virtualization options for the open-source project Docker and Red Hat

Dockerlite: lightweight Linux Virtualization

Detailed explanation of the entire process of building Gitlab CI for Docker

What is the difference between Docker and a normal Virtual Machine?

Docker will change everything

Before installation

Before installation, install the curl and python-software-properties packages to install additional resource libraries.

Sudo apt-get update
Sudo apt-get install curl python-software-properties-qqy

Add Resource Library

Sudo apt-key adv -- keyserver hkp: // keyserver.ubuntu.com: 80 -- recv-keys plugin "deb http://get.docker.io/ubuntu docker main" | sudo tee/etc/apt/sources. list. d/docker. list

Sudo apt-add-repository ppa: tsuru/lvm2-y
Sudo apt-add-repository ppa: tsuru/ppa-y

Sudo apt-key adv -- keyserver hkp: // keyserver.ubuntu.com: 80 -- recv 7F0CEB10echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | sudo tee/etc/apt/sources. list. d/mongodb. list

Sudo apt-get update

Install beanstalkd

Sudo apt-get install beanstalkd-qqy
Cat>/tmp/default-beanstalkd <strong = listen _ LISTEN_PORT = 11300DAEMON_OPTS = "-l \ $ response-p \ $ BEANSTALKD_LISTEN_PORT-B/var/lib/beanstalkd" START = yesEOFsudo mv/tmp/default-beanstalkd/etc/default/beanstalkd
Sudo service beanstalkd start

Install redis

Sudo apt-get install redis-server-qqy

Install hipache

Sudo apt-get install node-hipache-qqy
Sudo start hipache

Install docker

Sudo apt-get install lxc-docker-qqyecho export DOCKER_OPTS = \ "-H 127.0.0.1: 4243 \" | sudo tee-a/etc/default/dockerecho export DOCKER_HOST = 127.0.0.1: 4243> ~ /. Bashrc
Sudo stop docker
Sudo start docker

Install gandalf

Sudo apt-get install gandalf-server-qqyhook_dir =/home/git/bare-template/hooks
Sudo mkdir-p $ hook_dirsudo curl https://raw.githubusercontent.com/tsuru/tsuru/master/misc/git-hooks/post-receive-o $ {hook_dir}/post-receive
Sudo chmod + x $ {hook_dir}/post-receive
Sudo chown-R git: git/home/git/bare-template # make sure you write the public IP of the machine in the "host" parameter # in the/etc/gandalf. conf filesudo start gandalf-server
Sudo start git-daemon

Install tsuru API server

Sudo apt-get install tsuru-server-qqy

Sudo curl http://script.cloud.tsuru.io/conf/tsuru-docker-single.conf-o/etc/tsuru. conf # make sure you replace all occurrences of {{{ HOST_IP }}with the machine's # public IP in the/etc/tsuru. conf filesudo sed-I-e's/= no/= yes/'/etc/default/tsuru-server
Sudo start tsuru-ssh-agent
Sudo start tsuru-server-api
Sudo start tsuru-server-collector

Platform Installation

Curl https://raw.githubusercontent.com/tsuru/tsuru/master/misc/platforms-setup.js | mongo tsuru

In this way, they will be installed from basebuilder to your specified system, such as Python:

Docker build -- no-cache-t tsuru/python https://raw.githubusercontent.com/flaviamissi/basebuilder/master/python/Dockerfile

Replace Python with other platforms (you can check basebuilder to obtain a list of supported platforms ).

Use the tsuru Client

Congratulations, you already have a tsuru server that can run. You can referTsuru client usage guideTo build your application.

Add Service

Here is a complete document on how to install the MySQL service step by step:Install and configure a MySQL service.

DNS Server

You can also integrate a DNS server for Tsuru. For more information, seeHere you can find an example of using bind as a DNS forwarderTo integrate with Tsuru.

Docker details: click here
Docker: click here

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.