Giter VIP home page Giter VIP logo

rancher-dev's Introduction

使い方

設置方法

$ [email protected]:iganari/rancher-dev.git
$ cd rancher-dev/opsfiles/vagrant
$ vagrant up

これで3台のUbuntuが立ち上がる。

IP hostname VirtualBox name vagrant name
192.168.133.111 rancher-dev01 rancher-dev01 svr01
192.168.133.112 rancher-dev02 rancher-dev02 svr02
192.168.133.113 rancher-dev03 rancher-dev03 svr03

rancher hostので作業

上記で立ち上げたサーバーのうち、1台をrancherのmasterにし、エンドポイントにする。

  • rancher-dev01にvagrant sshログイン
$ cd opsfiles/vagrant
$ vagrant ssh svr01

=====================
ここからは、vagrant内

$ sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server

上記が正常に動いたらブラウザから下記にアクセス

http://192.168.33.111:8080

rancherのhostを設定しなくてはイケない

rancherのhostをきめる

host --> add

まずは自分を設定する これで1つのサーバの中に rancherのwebとrancherのコンテナをおくhostサーバが立ち上がるミニマムな環境が出来る

$ cd opsfiles/vagrant
$ vagrant ssh svr01

=====================
ここからは、vagrant内

$ sudo docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.1.3 http://192.168.33.111:8080/v1/scripts/9D8492950C217E7ADFF6:1484845200000:64KOq6LggxSIDVBQAG0YhrQGdQU

上記はwebに書いてあるものをコピーにして貼るのみ しばらくすると、hostに登録されます

2台目を作る

rancher-dev02をhostに登録する

host > add で、192.168.33.112用のコマンド発行

これをrancher-dev02でうつ(rancher-dev01ではない)

$ cd opsfile/vagrant
$ vagrant ssh svr02

=====================
ここからは、vagrant内

sudo docker run -e CATTLE_AGENT_IP="192.168.33.112"  -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.1.3 http://192.168.33.111:8080/v1/scripts/9D8492950C217E7ADFF6:1484845200000:64KOq6LggxSIDVBQAG0YhrQGdQU

以上で、たされたので再びhostで確認

2台目も確認できたらOK

wordpess

カタログから立ち上げ

IPの確認

192.168.33.112 でおk

まとめ

構築テストは仮想でもいいけど、それいじょうやるとmacが悲鳴をあげます

rancher-dev's People

Contributors

iganari avatar

Stargazers

Kazumi OHIRA / @dz_ avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.