Commit Graph

5 Commits

Author SHA1 Message Date
Bharat Kunwar 799563eb61 Remove shebang from scripts
Without this, heat container agents using  kubectl version
1.18.x (e.g. ussuri-dev) fail because they do not have the correct
KUBECONFIG in the environment.

Task: 39938
Story: 2007591

Change-Id: Ifc212478ae09c658adeb6ba4c8e8afc8943e3977
2020-06-16 20:53:07 +00:00
Diogo Guerra 1ecec95b8c Fix api-cert-manager=true blocking cluster creation
In the current release, cert-api-manager runs on kubecluster.yaml [1],
but in the kubemaster.yaml [2] the script [3] expects the existance of
the ca.key file (if the cert_api_manager_enabled=true), otherwise it gets blocked.
This file (ca.key), in turn, it's created only when enable-cert-api-manager.sh runs [4]

So, we have a dead lock...
So we need to change the call enable-cert-api-manager.sh into the kubemaster.yaml

[1] https://github.com/openstack/magnum/blob/master/magnum/drivers/k8s_fedora_atomic_v1/templates/kubecluster.yaml#L1158-L1161
[2] https://github.com/openstack/magnum/blob/master/magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml#L760
[3] https://github.com/openstack/magnum/blob/master/magnum/drivers/common/templates/kubernetes/fragments/enable-services-master.sh#L12-L16
[4] https://github.com/openstack/magnum/blob/master/magnum/drivers/common/templates/kubernetes/fragments/enable-cert-api-manager.sh#L11

On other issue, the chown of this file (ca.key) it's not working. Moving the
call of this file into kubemaster.yaml makes cluster creation FAILS because of
an error [7] in [5]. If we check a cluster created in stein [6] we notice that
the file is owned by root:root. Knowing this we can comment [5] for now.

[5] https://github.com/openstack/magnum/blob/master/magnum/drivers/common/templates/kubernetes/fragments/enable-cert-api-manager.sh#L13
[6] http://paste.openstack.org/show/788534/
[7] http://paste.openstack.org/show/788537/

Change-Id: Ibee2df435c3f7c34bff74e9146fb28d8367124b1
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
2020-01-17 14:29:36 +01:00
Diogo Guerra dc8acda7f6 Fix if condition to test for var==true
Change the validation of the script execution to run only when
CERT_MANAGER_API == true as per default definition. 

dropping:  if RUN != "false"

Change-Id: I73aad3a3455fa3ebf9b360c40aa6ac003a44ac8a
2019-10-28 17:41:45 +00:00
Lingxian Kong cae7fa21b6 [k8s] Cluster creation speedup
- Start workers as soon as the master VM is created, rather than
  waiting all the services ready.
- Move all the SoftwareDeployment outside of kubemaster stack.
- Tweak the scripts in SoftwareDeployment so that they can be combined
  into a single script.

Story: 2004573
Task: 28347
Change-Id: Ie48861253615c8f60b34a2c1e9ad6b91d3ae685e
Co-Authored-By: Lingxian Kong <anlin.kong@gmail.com>
2018-12-15 11:59:57 +00:00
Feilong Wang cff4823168 Rename scripts
Scripts are the core of Magnum for COE deployment. To be more
clear and consistent, two changes proposed in this patch:

1. Rename network related script to xxx-flannel-xxx given they
are all for flannel and now we have calico driver.

2. Adding .sh for some scripts to be consistent with others.

Change-Id: I97f3e53b4b43648a4896193fb4ce469dbf42c611
2018-07-10 06:02:20 +12:00