Skip to content

Commit

Permalink
Add technical documentation and README
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickB committed Mar 21, 2015
1 parent 210de78 commit 182aad1
Show file tree
Hide file tree
Showing 29 changed files with 1,349 additions and 136 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Clouder
-------

Clouder is a platform which aim to standardize the good practices to host open-source softwares. Whether you are launching an hosting offer, are the sysadmin of a company or just want to host softwares for you and your friends, Clouder will allow you to easily deploy and maintain a professionnal infrastructure with very basic technical knowledge.

More specifically, it is an orchestrator which is based on the container technology (currently only support Docker), each application will be installed inside a container and Clouder will establish links between them. It is based on Odoo, an open-source software which is very efficient to manage this kind of workflow and process.

You'll find in the project the core module, clouder, which install the clouder concepts in Odoo, and the template modules (like clouder_template_odoo) which install data and functions specifics to each applications you want to host. Once you are familiar with Clouder, installing an application is as easy as filling a form! (Which mean you can automatate it with a form on your website).
And the best is, you don't need to make extensive research if you want to provide hosting for a new app, just install the template module made by others and you're set.


Community
---------

You can find more informations, support forum and mailing-list on https://www.goclouder.net/, you can find the documentation at http://doc.goclouder.net/.

Developpement (including documentation) is done here on github, contributions are welcome; please read the CLA guidelines https://github.com/clouder-community/clouder/blob/8.0/doc/cla/sign-cla.md if you want to make a pull request.


Getting started
---------------

(To refactor and move on functional documentation)

Installation :

-Install an OpenERP 7 on one physical server, and install the clouder modules on it. I'll call orchestrator the system user running the OpenERP server.

-Install on the physical machine which will run the container the package docker.io (I use the deb http://get.docker.io/ubuntu docker main repo)

-Add the ssh key of orchestrator system user to the authorized_keys of the root user of the machine for containers

-On the OpenERP, add the server, generate images and start create the subcomponent container for shinken/bind/backup/proxy.

-Then, start creating your own applications and deploy them through the base menu
25 changes: 17 additions & 8 deletions __unfinished__/clouder_invoicing/clouder_invoicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,14 @@
#
##############################################################################


from openerp import models, fields, api, _
from openerp.exceptions import except_orm
from datetime import datetime
import re

import logging
_logger = logging.getLogger(__name__)
from openerp import models, fields


class ClouderApplication(models.Model):
"""
Add the default price configuration in application.
"""

_name = 'clouder.application'

container_price_partner_month = fields.Float('Price partner/month')
Expand All @@ -48,6 +45,10 @@ class ClouderApplication(models.Model):


class ClouderContainer(models.Model):
"""
Add the price configuration in container.
"""

_inherit = 'clouder.container'

price_partner_month = fields.Float('Price partner/month')
Expand All @@ -57,6 +58,10 @@ class ClouderContainer(models.Model):


class ClouderService(models.Model):
"""
Add the price configuration in service.
"""

_inherit = 'clouder.service'

price_partner_month = fields.Float('Price partner/month')
Expand All @@ -66,6 +71,10 @@ class ClouderService(models.Model):


class ClouderBase(models.Model):
"""
Add the price configuration in base.
"""

_inherit = 'clouder.base'

price_partner_month = fields.Float('Price partner/month')
Expand Down
4 changes: 1 addition & 3 deletions __unfinished__/clouder_template_cas/clouder_template_cas.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@
#
##############################################################################

from openerp import modules
from openerp import models, fields, api, _
import openerp.addons.clouder.clouder_model as clouder_model
from openerp import models, fields
23 changes: 22 additions & 1 deletion __unfinished__/clouder_template_git/clouder_template_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,21 @@
##############################################################################


from openerp import models, fields, api, _
from openerp import models, api


class ClouderApplicationVersion(models.Model):
"""
Add method to build application version.
"""

_inherit = 'clouder.application.version'

@api.multi
def build_application(self):
"""
Get the gitlab archive from official website.
"""
super(ClouderApplicationVersion, self).build_application()
if self.application_id.code == 'gitlab':
ssh = self.connect(self.archive_id.fullname)
Expand All @@ -46,10 +53,17 @@ def build_application(self):


class ClouderService(models.Model):
"""
Add method to manage the gitlab service deployment.
"""

_inherit = 'clouder.service'

@api.multi
def deploy_post_service(self):
"""
Deploy the service.
"""
super(ClouderService, self).deploy_post_service()
if self.application_id.code == 'gitlab':
ssh = self.connect(self.container_id.fullname)
Expand Down Expand Up @@ -100,10 +114,17 @@ def deploy_post_service(self):


class ClouderBase(models.Model):
"""
Add method to manage gitlab base.
"""

_inherit = 'clouder.base'

@api.multi
def deploy_build(self):
"""
Configure the gitlab.
"""
res = super(ClouderBase, self).deploy_build()
if self.application_id.code == 'gitlab':
ssh = self.connect(self.service_id.container_id.fullname)
Expand Down
31 changes: 14 additions & 17 deletions __unfinished__/clouder_users/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,22 @@
#
##############################################################################

from openerp import models, api

from openerp import netsvc
from openerp import pooler
from openerp.osv import fields, osv, orm
from openerp.tools.translate import _

import time
from datetime import datetime, timedelta
import subprocess
import openerp.addons.clouder.execute as execute
import erppeek
class ClouderContainer(models.Model):
"""
Manage link between ldap.server object and ldap container.
"""

import logging

_logger = logging.getLogger(__name__)


class clouder_container(osv.osv):
_inherit = 'clouder.container'

@api.multi
def deploy_post(self):
super(clouder_container, self).deploy_post()
"""
Add a ldap.server in clouder when we create a new ldap container.
"""
super(ClouderContainer, self).deploy_post()
if self.application_id.type_id.name == 'openldap':

domain_dc = ''
Expand All @@ -66,6 +60,9 @@ def deploy_post(self):
})

def purge(self):
"""
Remove the ldap.server in clouder when we unlink an ldap container.
"""
if self.application_id.type_id.name == 'openldap':

hostport = False
Expand All @@ -77,4 +74,4 @@ def purge(self):
server_ids = server_obj.search([
('host', '=', self.server_id.name), ('port', '=', hostport)])
server_ids.unlink()
return super(clouder_container, self).purge()
return super(ClouderContainer, self).purge()
Loading

0 comments on commit 182aad1

Please sign in to comment.