Giter Club home page Giter Club logo

hives's Introduction

Hives

Manage serveral memberhive instances for either Version 1 or 2

Requirements

  • ruby >= 2.1.3
  • docker >= 1.7.0
  • git

Currently the only supported host manager is plesk. We use plesk to create subdomains and the configurations of the hosts. In the future we will support at least spinning up digitalocean instances and configuring them.

Tools

show console output docker attach mh-server-$NAME

get a shell on the instance docker exec -it mh-server-$NAME bash

get a root shell on the instace docker exec -it -u root mh-server-$NAME bash

MHv1

install mongo on the docker server instance apt-get install mongodb

connect to the mongo instance mongo mg-db-$NAME:27017/$NAME -u $NAME -p $PASSWORD

Mongo Commands

  • show collections

##MHv2 install mysql on the docker server instance

Install

git clone https://github.com/digitaldeacon/hives.git
sh install.sh # creates folders and stuff

Modify the config.json to your new configuration

{
  "sites" : {
    "ecg" : {
      "name": "Evangeliums Christen Gemeinde Berlin",
      "resources" : -1,
      "version": 1
    }
  }
}

then run sudo ruby root_create.rb

Deploy

  • Push to git
  • Pull on webserver

Commands

If you updated config.json to have a new site you have to run sudo ruby root_create.rb to create this site as well. But if you only want to update the exiting sites you have to run ruby update.rb.

To restart and recreate all the instances run ruby restart.rb. This also rebuild and updates the docker images.

hives's People

Contributors

metaxy avatar axtho avatar

Watchers

 avatar James Cloos avatar EBTC.Online avatar Samuel Mehrbrodt avatar  avatar

hives's Issues

Docker Update breaks a lot

After updating docker to Docker version 1.11.1, build 5604cbe restarting memberhive fails with the following output:

docker rm mh-server-ecg-wartenberg

Error response from daemon: Driver aufs failed to remove root filesystem 70993f4d5ff46c2494b28bac1133ca6af298535987538167f979f061533c856e: rename /var/lib/docker/aufs/diff/00eec65a2e065d7068fe230ddb4123136e229cf3ef40e3b4dd5837fa465088a4 /var/lib/docker/aufs/diff/00eec65a2e065d7068fe230ddb4123136e229cf3ef40e3b4dd5837fa465088a4-removing: device or resource busy

I had to stop and remove all docker instances as root and then use the hives restart.rb.

Correct rights

When creating a new client the data path will have root as owner!

Maybe this caused #9.

Multipile pushes cause errors.

If a later test of a commit on travis finished first, and than the next commit finished, then the references to the js and css will be broken, because the content of the index.html is not regenerated, if the branch is up-to-date.

Is mongo secure?

Is the connection to the mongo db secure and needs an authentication?

Deploy after restart.rb

It don't think it works quite right. I have to run update.rb so it will installing the npm packages.

Connection issues between containers

The test instance fails after a while to connect to the mongo instance.
It tried to remove and reconnect but after a while it happens again.

I am not sure if it happens because it is named "test" or if other instances are also affected by it…

Provide API

Running scripts after git is cool but fine grained api calls are better.

Expose WebUrl as a env variable.

Currently even the address to the api is hard coded in update.rb:12.

Fix this by adding a option in config.json and give the web server and api server a name, by which it can be accessed.

Backups of all Data

It is a simple a an cp oder rsync of the data/ folder.
We can store some backups on lukas but we need most certainly an remote backup!

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.