nfvlabs / openmano

Openmano is an open source project that provides a practical implementation of the reference architecture for Management & Orchestration under standardization at ETSI’s NFV ISG
Apache License 2.0
180 stars 74 forks source link

docker as vim #34

Open nephilimboy opened 7 years ago

nephilimboy commented 7 years ago

Hi... i'm working on college project about vnf's service chain so i want to use docker(more specific... kubernetes) as vim for my test bed, is there any plan to use docker as vim in openmano? if not can you give me a hit how to do it? thanks in advance

alf-tierno commented 7 years ago

Hi, Currently openmano does not suppor docker/kubernetes as a VIM. You can implement it easily following this steps: https://osm.etsi.org/wikipub/index.php/Developer_HowTo_for_RO_Module#Creating_a_new_VIM_plugin

On the other hand latest versions of openmano is no longer hosted at github but at ETSI, it is a component (called RO) of the OSM project (https://osm.etsi.org).

nephilimboy commented 7 years ago

thanks for reply,, i wrote the vimconn_docker.py and put it in openmano package how can i cant install plugin in openmano,, i noticed in "nfvo.py" we have this line of code

 vim_dict={}
    for vim in content:
        extra={'datacenter_tenant_id': vim.get('datacenter_tenant_id')}
        if vim["config"] != None:
            extra.update(yaml.load(vim["config"]))
        if vim["type"] not in vimconn_imported:
            module_info=None
            try:
                module = "vimconn_" + vim["type"]
                module_info = imp.find_module(module)
                vim_conn = imp.load_module(vim["type"], *module_info)
                vimconn_imported[vim["type"]] = vim_conn
            except (IOError, ImportError) as e:
                if module_info and module_info[0]:
                    file.close(module_info[0])
                print "Cannot open VIM module '%s.py'; %s: %s" % ( module, type(e).__name__, str(e))
                return -HTTP_Bad_Request, "Unknown vim type %s" % vim["type"]

        try:
            #if not tenant:
            #    return -HTTP_Bad_Request, "You must provide a valid tenant name or uuid for VIM  %s" % ( vim["type"])
            vim_dict[ vim['datacenter_id'] ] = vimconn_imported[ vim["type"] ].vimconnector(
                            uuid=vim['datacenter_id'], name=vim['datacenter_name'],
                            tenant_id=vim.get('vim_tenant_id'), tenant_name=vim.get('vim_tenant_name'),
                            url=vim['vim_url'], url_admin=vim['vim_url_admin'], 
                            user=vim.get('user'), passwd=vim.get('passwd'),
                            config=extra
                    )

is that means openmano automatically find the vimconn_docker and i dont need to add my python docker connector to it? if not, how can i install my python class to openmano? cuz i already put my class in the folder but nothing happen when i create vnf's. i used these command according to https://github.com/nfvlabs/openmano/wiki/using-openstack-as-a-VIM

./openmano datacenter-create  myos "test_url" --type=docker --config=test_config"
alf-tierno commented 7 years ago

Hi ,

Yes, openmano load the module automatically when you add the datacenter.

./openmano datacenter-create myos "test_url" --type=docker #--config=test_config"

Module must be called vimconn_docker.py. --config is not needed unless it is used at your connector for set something

There is not any iteration with this vim until the instantiation. Adding a VNF or scenario is just an annotation at database only. You can exercise the connector with openmano vim-image-list openmano vim-tenant-list openmano vim-net-list You can run a test: ./test/test_RO.py deploy -n -t osm -i -d -m --test=simple_linux The -m make the test to stop after deployed. A docker container should be created

The last code is at ETSI, not at github. I expect you have used https://osm.etsi.org/wikipub/index.php/Developer_HowTo_for_RO_Module instructions to install openmano isolated or https://osm.etsi.org/wikipub/index.php/OSM_Release_TWO to install the full OSM (recommended)

The last documentation is also at ESTI. See e.g. https://osm.etsi.org/wikipub/index.php/Openstack_configuration_(Release_TWO)#Add_openstack_to_OSM

Finally we can use OSM_TECH@LIST.ETSI.ORGmailto:OSM_TECH@LIST.ETSI.ORG mail list, that is the official one; instead of nfvlabs.

Tell me if you need more help

Regards


Alfonso Tierno alfonso.tiernosepulveda@telefonica.com

From: nephilimboy [mailto:notifications@github.com] Sent: Thursday, June 29, 2017 8:41 AM To: nfvlabs/openmano openmano@noreply.github.com Cc: ALFONSO TIERNO SEPULVEDA alfonso.tiernosepulveda@telefonica.com; Comment comment@noreply.github.com Subject: Re: [nfvlabs/openmano] docker as vim (#34)

thanks for reply,, i wrote the vimconn_docker.py and put it in openmano package how to i cant install plugin on openmano,, i noticed in "nfvo.py" we have this code

vim_dict={}

for vim in content:

    extra={'datacenter_tenant_id': vim.get('datacenter_tenant_id')}

    if vim["config"] != None:

        extra.update(yaml.load(vim["config"]))

    if vim["type"] not in vimconn_imported:

        module_info=None

        try:

            module = "vimconn_" + vim["type"]

            module_info = imp.find_module(module)

            vim_conn = imp.load_module(vim["type"], *module_info)

            vimconn_imported[vim["type"]] = vim_conn

        except (IOError, ImportError) as e:

            if module_info and module_info[0]:

                file.close(module_info[0])

            print "Cannot open VIM module '%s.py'; %s: %s" % ( module, type(e).__name__, str(e))

            return -HTTP_Bad_Request, "Unknown vim type %s" % vim["type"]

    try:

        #if not tenant:

        #    return -HTTP_Bad_Request, "You must provide a valid tenant name or uuid for VIM  %s" % ( vim["type"])

        vim_dict[ vim['datacenter_id'] ] = vimconn_imported[ vim["type"] ].vimconnector(

                        uuid=vim['datacenter_id'], name=vim['datacenter_name'],

                        tenant_id=vim.get('vim_tenant_id'), tenant_name=vim.get('vim_tenant_name'),

                        url=vim['vim_url'], url_admin=vim['vim_url_admin'],

                        user=vim.get('user'), passwd=vim.get('passwd'),

                        config=extra

                )

is that mean openmano automatically find the vimconn_docker and i dont need to add my python docker connector to it? if not, how can i install my python class to openmano? cuz i already put my class in the folder but nothing happen when i create vnf's. i used these command according to https://github.com/nfvlabs/openmano/wiki/using-openstack-as-a-VIM

./openmano datacenter-create myos "test_url" --type=docker --config=test_config"

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/nfvlabs/openmano/issues/34#issuecomment-311876595, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKYO7VfgkJ-ao1-tci7V5zR8BeUbbmixks5sI0cJgaJpZM4OG3mE.


Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição

MoubarakZoure commented 5 years ago

Hello nephilimboy Please can you share with me your vim_connect class ?

nephilimboy commented 5 years ago

Hi MoubarakZoure Sadly i have lost my old customized Openmano source code and slides. As alf-tierno mentioned before, you can use the latest ETSI or use and customize other opensource solutions like my latest project https://nephilimboy.github.io/XNFV/