[Starlingx-discuss] [Containers] Background info on helm charts

Arevalo, Mario Alfredo C mario.alfredo.c.arevalo at intel.com
Thu Feb 7 20:12:46 UTC 2019


Hi team,

There is a pair of issues which needs to be solved in order to create a “fm rest api” docker
image that can work correctly.
 
Issue 1:
=======

The fm-rest-api requires a configuration file called "api-paste.ini"[0]. It seems that this file
is created in the deployment process in this section by puppet:
https://git.starlingx.io/cgit/stx-config/tree/puppet-modules-wrs/puppet-fm/src/fm/manifests/init.pp#n109

proposal: I noticed how devstack process deal with this, firstly the “api-paste.ini” file was added manually
inside devstack/files directory[1], then during the devstack execution process, the plugin just makes a
copy to the environment:
https://git.starlingx.io/cgit/stx-fault/tree/devstack/lib/stx-fault#n173

I wonder if it is the best approach to do something similar using the variable “CUSTOMIZATION” of loci with
something like this: “cat > /etc/fm/api-paste.ini << EOF config lines EOF” or maybe cloning the stx-fault repository
and copying the available file in the devstack directory[0] to “/etc/fm”.

Issue 2:
=======

The “fm rest api” requires a shared object called “libfmcommon.so”, this library is created in fm-common project,
however it is not available in any wheel package.

Proposal: I am not sure if something like this should be enough:
data_files=[('/usr/lib64', ['libfmcommon.so'])], inside the setup.py[2]

Furthermore I tried to add it from the specfile:
https://git.starlingx.io/cgit/stx-fault/tree/fm-common/centos/fm-common.spec#n54
however­ I think this is not a good option.

What do you think is the best approach to tackle these issues?

Any comments are welcome.

Best regards.
Mario.

[0] https://git.starlingx.io/cgit/stx-fault/tree/devstack/files/api-paste.ini
[1] https://git.starlingx.io/cgit/stx-fault/tree/devstack/files
[2] https://git.starlingx.io/cgit/stx-fault/tree/fm-common/sources/setup.py



________________________________________
From: Arevalo, Mario Alfredo C [mario.alfredo.c.arevalo at intel.com]
Sent: Friday, February 01, 2019 7:54 PM
To: Penney, Don; Miller, Frank
Cc: starlingx-discuss at lists.starlingx.io
Subject: Re: [Starlingx-discuss] [Containers] Background info on helm charts

Hi Folks,

This a short update about this task (I will be in holiday for our next containerization meeting).
During this week I have been exploring the scripts and tools involved in the containerization
building process. This activity and the wiki page shared by Don Penny have allowed me to
get a better understating of the work-flow. I have sent a PR[1] with the required files to create an
image for fm-rest-api service. At this moment it is WIP due to I need to do testing.  Possibly
it will require more dependencies which are not available in the wheels.cfg/tarball, I will continue
working on this.
During the building tools exploration I had some issues related to network due to I am working
behind a proxy, I sent a  patch[2] to set it in the docker build/run commands and avoid manually
modification efforts.

Any comments, feel free to contact me.

[1] https://review.openstack.org/#/c/634540/
[2] https://review.openstack.org/#/c/634542/

Best regards.
Mario.

________________________________________
From: Penney, Don [Don.Penney at windriver.com]
Sent: Wednesday, January 30, 2019 7:24 AM
To: Arevalo, Mario Alfredo C; Miller, Frank
Cc: Saul Wold; starlingx-discuss at lists.starlingx.io
Subject: RE: [Containers] Background info on helm charts

https://wiki.openstack.org/wiki/StarlingX/Containers/BuildingImages


-----Original Message-----
From: Penney, Don
Sent: Tuesday, January 29, 2019 10:34 AM
To: 'Arevalo, Mario Alfredo C'; Miller, Frank
Cc: Saul Wold; starlingx-discuss at lists.starlingx.io
Subject: RE: [Containers] Background info on helm charts

Hi Mario,

I'm making "writing a wiki" one of my top priorities. I'm hoping to get started on it today, and try to get something published in the next couple of days, barring other issues coming along.

Cheers,
Don.

-----Original Message-----
From: Arevalo, Mario Alfredo C [mailto:mario.alfredo.c.arevalo at intel.com]
Sent: Monday, January 28, 2019 4:15 PM
To: Miller, Frank
Cc: Saul Wold; starlingx-discuss at lists.starlingx.io; Penney, Don
Subject: RE: [Containers] Background info on helm charts

Hi Frank,

Thank you for the information, however my doubts are oriented more to the work-flow
than the Dockerfile/helm/chart/ tools. Even I created a dockerfile[1] for FM service in the
last week, nevertheless, the starlingx work-flow includes some parts which I have not digested
completely yet. Don Penny have helped me sending useful information related to this (Thanks for that),
the interaction between OpenStack/loci system and python/wheels. However I have some gaps,
for example, as staring point I have to create the docker image which will be consumed by the
chart. There are some build scripts and notes that talks about this, but precisely, there are a pair of lines
in the build-tools/README which makes reference to a exposed service that is not specified [2,3].
For that reason I asked for a little more detailed information about the work-flow during our meeting today.

Thanks for your attention.

Best regards.
Mario.

[1] https://github.com/MarioCarrilloA/chart-playground
[2] https://github.com/openstack/stx-root/blob/master/build-tools/build-docker-images/README#L4
[3] https://github.com/openstack/stx-root/blob/master/build-tools/build-docker-images/README#L9







From: Miller, Frank [Frank.Miller at windriver.com]

Sent: Monday, January 28, 2019 11:19 AM

To: Arevalo, Mario Alfredo C

Cc: Saul Wold; starlingx-discuss at lists.starlingx.io

Subject: [Containers] Background info on helm charts







Mario:

On the containers community call this morning we took an action to identify information about helm charts.  Irina Mihai identified four references that she used when working on the cinder helm chart overrides. See [1] to [4] below.

Also as you work on creating a helm chart for the FM service, you should look at examples of existing helm charts for a reference.  2 good examples are:
*
Cinder helm chart which is available in the upstream openstack-helm project [5] and uses certain defaults.  We have added StarlingX specific overrides which are generated from code we added [6].
*
Nova-api-proxy which is a StarlingX specific service and hence was created from scratch [7,8]

Frank

[1]

https://docs.helm.sh/developing_charts/
[2] https://medium.com/containerum/how-to-make-and-share-your-own-helm-package-50ae40f6c221
[3]  https://docs.bitnami.com/kubernetes/how-to/create-your-first-helm-chart/
[4] Helm chart install order https://github.com/helm/helm/blob/release-2.10/pkg/tiller/kind_sorter.go#L29
[5] Cinder helm chart in upstream openstack-helm:

https://git.openstack.org/cgit/openstack/openstack-helm/tree/cinder
[6] StarlingX cinder overrides: See cinder.py in

https://github.com/openstack/stx-config/tree/master/sysinv/sysinv/sysinv/sysinv/helm

[7] Helm chart for nova_api_proxy:

https://git.openstack.org/cgit/openstack/stx-config/tree/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/nova-api-proxy

[8] nova_api_proxy override code: See nova_api_proxy.py
in
https://github.com/openstack/stx-config/tree/master/sysinv/sysinv/sysinv/sysinv/helm





_______________________________________________
Starlingx-discuss mailing list
Starlingx-discuss at lists.starlingx.io
http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss



More information about the Starlingx-discuss mailing list