GithubHelp home page GithubHelp logo

contrail-ansible-internal's Introduction

Contrail-ansible-internal

Ansible code to provision contrail services

This ansible code help to provision contrail services running within the container. This code is supposed to run by contrailctl and not to run by user. contrailctl read its configuration file, pass the configurations to ansible as variables and run this ansible code with appropriate high level playbook found directly under playbooks/ directory.

Any changes that need to go to any internal service configuration file, any internal service management and other things related to internal services within the container should go here.

contrail-ansible-internal's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

contrail-ansible-internal's Issues

setting /etc/hosts entry should be happening within the container

Currently lineinfile has an issue due to which we cannot use lineinfile for /etc/hosts in docker which is basically a docker mounted file. Because of this currently it is implemented on base_host.yml which run outside of container so external orchestrator has to handle this unless they use base_host.yml.

Ideally those things to be done inside the container.

lineinfile has option unsafe_writes which fix this, but that is only available from ansible version 2.2 onwards where current stable version available as package is 2.1. May be another option to use shell/command module with sed command.

The docker container should work properly if the configuration is applied while it is running

Unlike the ansible or server manager way of deployment, the Juju charms will not know any of the nodes ipaddress (controller or analytics) upfront. The reason is that, it is deployed this in the Canonical MAAS environment and the MAAS server dynamically allocates ipaddress for these servers via dhcp (this is pretty much what will be there in the customer setup as well). This means that we should not assume that the user has to supply the ipaddress first before bringing up the container. I should be able to bring the container and then apply the configuration as and when I have all the information via ‘contrailctl’ tool. I find that this does not work properly. I have to launch the container with all the relevant ip addresses in the conf file for things to work

zk role need to support tags - install, configure

Since we run ansible-code with tags to run different set of code in container build, and run time, all roles should support both install, configure roles.

Currently both install and configure/provisioning code run in both the time for zookeeper.

ubuntu 14-04 contrail-status failing in controller container

== Contrail Support Services ==
supervisor-support-service: active (disabled on boot)
Traceback (most recent call last):
File "/usr/bin/contrail-status", line 492, in
main()
File "/usr/bin/contrail-status", line 480, in main
supervisor_status('support-service', options)
File "/usr/bin/contrail-status", line 403, in supervisor_status
check_status('supervisor-support-service', options)
File "/usr/bin/contrail-status", line 376, in check_status
check_svc_status(svc_name, options.debug, options.detail, options.timeout)
File "/usr/bin/contrail-status", line 317, in check_svc_status
raise Exception("%s does not exist! Cannot check supervisor status." % service_sock)
Exception: /var/run/supervisord_support_service.sock does not exist! Cannot check supervisor status.
root@server12:/#

set virtual router type to “embedded” during vrouter provisioning

From: Sachchidanand Vaidya
Date: Tuesday, October 4, 2016 at 12:38 AM
To: Harish Kumar, Andra Cismaru, Artur Dębski, Rudra Rugge
Cc: Praneet Bachheti, Adam Nieżurawski, Paweł Melon
Subject: Re: Ansible issues

Hi Harish,
Can you set virtual router type to “embedded” during vrouter provisioning. This is more
for completeness than any functionality.

Thanks
Sachin

possible role of a "system" container

There may be bunch of things related to contrail needed to be done within the host like running ntp, setting some sysctl values, etc and this can be done through one container which run on all nodes

contrail-openstack-control install on docker fail in latest ubuntu trusty docker image

root@3ae8db731bd5:/# /usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install contrail-openstack-control
Reading package lists... Done
Building dependency tree
Reading state information... Done
contrail-openstack-control is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up libpam-systemd:amd64 (204-5ubuntu20.19) ...
invoke-rc.d: unknown initscript, /etc/init.d/systemd-logind not found.
dpkg: error processing package libpam-systemd:amd64 (--configure):
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
libpam-systemd:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

agent to configure with TLS auth

Here is the configs
DEFAULT.xmpp_auth_enable
DEFAULT.xmpp_server_cert, DEFAULT.xmpp_server_key, DEFAULT.xmpp_ca_cert

similarly, we have DEFAULT.xmpp_dns_auth_enable

control node port is different -5222 - TLS based XMPP port

webui contrail-webui-userauth.js is not respected

I made config.orchestration.Manager = 'none'; in config.global.js and then I see default admin credentials just work - (admin/contrail123). Then I changed password in contrail-webui-userauth.js and restarted both webui and middleware but still I am not able to use updated password and old password just work.

Just wanted to follow up with webui team to see if this is expected behavior and may be file bug to them if necessary.

Have the same redis for both analytics and webui

Have the same redis for both analytics and webui as that's the deployment scenario.
And move all the redis related settings (redis password,..) to common defaults file.
Currently redis_password is specified webui defaults file.

There should be a way to understand container name once connect to it

[11/21/16, 10:30:22 PM] SIVA GURUMURTHY: One other thing I noticed and I feel will be good from the end user point of view is
when you ‘docker exec’ it will be great to have the prompt reflect the container you have logged into
[11/21/16, 10:30:44 PM] SIVA GURUMURTHY: Today I have no clue by looking at the terminal in which container I am in now
[11/21/16, 10:31:16 PM] SIVA GURUMURTHY: Need to explore if there is a way to set the hostname when you launch the docker image and set it
[11/21/16, 10:38:01 PM] harishkrishnanmk: you cannot set a hostname when you use host based networking
[11/21/16, 10:38:24 PM] harishkrishnanmk: but we can definitely set bash prompt
[11/21/16, 10:38:42 PM] harishkrishnanmk: and a command to understand the container one logged in

Parallel execution of the contrailctl command is not working

Say for example say I am deploying 3 controllers, 3 analytics node and 3 analyticsdb node in 3 machines (1 controller, 1 analytics and 1 analytics db per machine). In the Juju charm world the ipaddress of the controller,analytics and analyticsdb node itself will be available dynamically when I establish ‘relations’ between them. This means I will dynamically query and get the ipaddress and the write it into the. conf files. This means the configuration to take effect I will have multiple ‘contrailctl config’ sync commands executing simultaneously (this will be for different instances of the same charm as well as multiple instances different charms). It fails in this scenario. Juju provides the facility to scale up and scale down the number of units of a charm however the user wants and so we need this to be fixed for this to work.

nodemanager doesnt work with systemd

when try to start nodemanager with systemd got below message - same message I get when try to run it manually from commandline.

contrail-vrouter-nodemgr.service - Contrail vrouter nodemanager
Loaded: loaded (/etc/systemd/system/contrail-vrouter-nodemgr.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Mon 2016-12-12 12:42:19 UTC; 2min 39s ago
Process: 708 ExecStart=/usr/bin/contrail-nodemgr --nodetype=contrail-vrouter (code=exited, status=0/SUCCESS)
Main PID: 708 (code=exited, status=0/SUCCESS)

Dec 12 12:42:19 harish-centos-test-2.localdomain systemd[1]: Started Contrail vrouter nodemanager.
Dec 12 12:42:19 harish-centos-test-2.localdomain contrail-nodemgr[708]: Discovery server: 192.168.0.63
Dec 12 12:42:19 harish-centos-test-2.localdomain contrail-nodemgr[708]: Discovery port: 5998
Dec 12 12:42:19 harish-centos-test-2.localdomain contrail-nodemgr[708]: Collector address: []
Dec 12 12:42:19 harish-centos-test-2.localdomain contrail-nodemgr[708]: Node manager must be run as a supervisor event listener

contrail_docker_registry_insecure and may be other related vars need to have default defined

TASK [docker : configuring init-system...] *************************************
failed: [localhost](item={u'm': u'0644', u'd': u'etc/default', u'f': u'docker'}) => {"failed": true, "item": {"d": "etc/default", "f": "docker", "m": "0644"}, "msg": "AnsibleUndefinedVariable: {% if docker_daemon_args is defined %}{{docker_daemon_args}}{% endif %} {{ docker_systemd_socket }} {{docker_insecure_registries_daemon_args}} {{docker_dns_daemon_args}} {{docker_bip_daemon_args}} {{docker_remote_args}} {{docker_cluster_advertise_args}} {{docker_cluster_store_args}} {{docker_storage_driver_args}}: {% if docker_insecure_registries is defined %} {% if docker_insecure_registries is string %} --insecure-registry {{docker_insecure_registries}} {% else %} {% for ir in docker_insecure_registries %} --insecure-registry {{ir}} {% endfor %} {% endif %} {% endif %}: {%- if contrail_docker_registry_insecure|bool and contrail_docker_registry %} {{ contrail_docker_registry }}{% endif %}: 'contrail_docker_registry_insecure' is undefined"}

All roles code need to be pulled under contrail-ansible

All third party modules as per discussion with Ashish need to be kept under thirdparty/ directory under roles.

It would probably need little more time to do this as those roles need to be changed to work in our environment (like supervisor based service management vs init scripts). So I would like to make the movement once those change done separately to those modules.

Also need to think on a strategy to move the code to contrail-ansible with easiest path to maintain some compatibility with upstream role so getting any change in upstream module comparatively easier (I know this is going to be difficult to achieve).

redis role need to support tags - install, configure

Since we run ansible-code with tags to run different set of code in container build, and run time, all roles should support both install, configure roles.

Currently both install and configure/provisioning code run in both the time for redis.

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.