Added seed code for caas-kubernetes. 00/600/1
authorSzekeres, Balazs (Nokia - HU/Budapest) <balazs.szekeres@nokia.com>
Thu, 2 May 2019 11:47:25 +0000 (13:47 +0200)
committerSzekeres, Balazs (Nokia - HU/Budapest) <balazs.szekeres@nokia.com>
Thu, 2 May 2019 11:47:25 +0000 (13:47 +0200)
Added seed code for caas-kubernetes.

Change-Id: Iff1a433f3fb6436b83c09ebf909e636b4e8c4e0c
Signed-off-by: Szekeres, Balazs (Nokia - HU/Budapest) <balazs.szekeres@nokia.com>
62 files changed:
LICENSE [new file with mode: 0644]
ansible/playbooks/bootstrap_kube_proxy.yaml [new file with mode: 0644]
ansible/playbooks/bootstrap_kubelet.yaml [new file with mode: 0644]
ansible/playbooks/kube_master.yaml [new file with mode: 0644]
ansible/playbooks/kube_secret_key_creation.yaml [new file with mode: 0644]
ansible/playbooks/kube_secret_key_distribution.yaml [new file with mode: 0644]
ansible/playbooks/kube_token_creation.yaml [new file with mode: 0644]
ansible/playbooks/kube_token_distribution.yaml [new file with mode: 0644]
ansible/playbooks/kubernetes_ceph.yaml [new file with mode: 0644]
ansible/playbooks/master_kube_proxy.yaml [new file with mode: 0644]
ansible/playbooks/master_kubelet.yaml [new file with mode: 0644]
ansible/playbooks/service_account_creation.yaml [new file with mode: 0644]
ansible/playbooks/service_account_distribution.yaml [new file with mode: 0644]
ansible/roles/kube_master/defaults/main.yaml [new file with mode: 0644]
ansible/roles/kube_master/meta/main.yml [new file with mode: 0644]
ansible/roles/kube_master/tasks/main.yml [new file with mode: 0644]
ansible/roles/kube_master/templates/apiserver.yml [new file with mode: 0644]
ansible/roles/kube_master/templates/audit-policy.yaml [new file with mode: 0644]
ansible/roles/kube_master/templates/cm.yml [new file with mode: 0644]
ansible/roles/kube_master/templates/scheduler.yml [new file with mode: 0644]
ansible/roles/kube_proxy/meta/main.yaml [new file with mode: 0644]
ansible/roles/kube_proxy/tasks/main.yml [new file with mode: 0644]
ansible/roles/kube_proxy/templates/kube-proxy.yml [new file with mode: 0644]
ansible/roles/kube_secret_key_creation/tasks/main.yml [new file with mode: 0644]
ansible/roles/kube_secret_key_creation/templates/secrets.conf [new file with mode: 0644]
ansible/roles/kube_secret_key_distribution/tasks/main.yml [new file with mode: 0644]
ansible/roles/kube_token_creation/tasks/main.yml [new file with mode: 0644]
ansible/roles/kube_token_creation/templates/tokens.csv [new file with mode: 0644]
ansible/roles/kube_token_distribution/tasks/main.yml [new file with mode: 0644]
ansible/roles/kube_token_reading/tasks/main.yaml [new file with mode: 0644]
ansible/roles/kubeconfig/tasks/main.yml [new file with mode: 0644]
ansible/roles/kubelet/defaults/main.yaml [new file with mode: 0644]
ansible/roles/kubelet/meta/main.yml [new file with mode: 0644]
ansible/roles/kubelet/tasks/configure_kubelet.yml [new file with mode: 0644]
ansible/roles/kubelet/tasks/main.yml [new file with mode: 0644]
ansible/roles/kubelet/tasks/preconfig.yml [new file with mode: 0644]
ansible/roles/kubelet/templates/env.list [new file with mode: 0644]
ansible/roles/kubelet/templates/kubelet.service [new file with mode: 0644]
ansible/roles/kubelet/templates/kubelet_healthcheck.service [new file with mode: 0644]
ansible/roles/kubelet/templates/kubelet_healthcheck.sh [new file with mode: 0644]
ansible/roles/kubelet/templates/kubelet_start.sh [new file with mode: 0644]
ansible/roles/kubelet/templates/kubelet_stop.sh [new file with mode: 0644]
ansible/roles/kubelet/templates/master-config.yaml.j2 [new file with mode: 0644]
ansible/roles/kubelet/templates/node_labels.j2 [new file with mode: 0644]
ansible/roles/kubelet/templates/worker-config.yaml.j2 [new file with mode: 0644]
ansible/roles/kubernetes_ceph/defaults/main.yaml [new file with mode: 0644]
ansible/roles/kubernetes_ceph/meta/main.yaml [new file with mode: 0644]
ansible/roles/kubernetes_ceph/tasks/create_ceph_auth_secret.yaml [new file with mode: 0644]
ansible/roles/kubernetes_ceph/tasks/create_ceph_storage_class.yaml [new file with mode: 0644]
ansible/roles/kubernetes_ceph/tasks/main.yaml [new file with mode: 0644]
ansible/roles/kubernetes_ceph/templates/ceph-secret.yaml.j2 [new file with mode: 0644]
ansible/roles/kubernetes_ceph/templates/ceph-storageclass.yaml.j2 [new file with mode: 0644]
ansible/roles/service_account_creation/meta/main.yml [new file with mode: 0644]
ansible/roles/service_account_distribution/tasks/main.yml [new file with mode: 0644]
ansible/roles/service_account_distribution/vars/main.yml [new file with mode: 0644]
caas-kubernetes.spec [new file with mode: 0644]
docker-build/hyperkube/Dockerfile [new file with mode: 0644]
docker-build/hyperkube/bom.json [new file with mode: 0644]
docker-build/hyperkube/common_scripts/wait-for-files [new file with mode: 0755]
docker-build/kubernetes-builder/Dockerfile [new file with mode: 0644]
docker-build/kubernetespause/Dockerfile [new file with mode: 0644]
docker-build/kubernetespause/bom.json [new file with mode: 0644]

diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..f433b1a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,177 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
diff --git a/ansible/playbooks/bootstrap_kube_proxy.yaml b/ansible/playbooks/bootstrap_kube_proxy.yaml
new file mode 100644 (file)
index 0000000..6e7b6ef
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: bootstrap_kubelet.yaml
+- hosts: caas_worker
+  strategy: free
+  become: true
+  become_user: "root"
+  roles:
+    - role: kube_proxy
+
diff --git a/ansible/playbooks/bootstrap_kubelet.yaml b/ansible/playbooks/bootstrap_kubelet.yaml
new file mode 100644 (file)
index 0000000..fea5294
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: kubedns.yaml
+- hosts: caas_worker
+  strategy: free
+  roles:
+    - kubelet
+  become: true
+  become_user: "root"
diff --git a/ansible/playbooks/kube_master.yaml b/ansible/playbooks/kube_master.yaml
new file mode 100644 (file)
index 0000000..ab6c31b
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: kube_secret_key_distribution.yaml
+- hosts: caas_master
+  strategy: free
+  become: true
+  become_user: "{{ users.admin_user_name }}"
+  roles:
+    - kube_master
diff --git a/ansible/playbooks/kube_secret_key_creation.yaml b/ansible/playbooks/kube_secret_key_creation.yaml
new file mode 100644 (file)
index 0000000..e3786fc
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: service_account_distribution.yaml
+- hosts: installation_controller:&caas_master
+  strategy: free
+  become: true
+  become_user: "root"
+  gather_facts: false
+  roles:
+    - role: kube_secret_key_creation
diff --git a/ansible/playbooks/kube_secret_key_distribution.yaml b/ansible/playbooks/kube_secret_key_distribution.yaml
new file mode 100644 (file)
index 0000000..c63673f
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: kube_secret_key_creation.yaml
+- hosts: caas_master
+  strategy: free
+  become: true
+  become_user: "{{ users.admin_user_name }}"
+  gather_facts: false
+  roles:
+    - kube_secret_key_distribution
diff --git a/ansible/playbooks/kube_token_creation.yaml b/ansible/playbooks/kube_token_creation.yaml
new file mode 100644 (file)
index 0000000..447dc64
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: docker.yaml
+- hosts: installation_controller:&caas_master
+  strategy: free
+  gather_facts: false
+  become: true
+  become_user: "root"
+  roles:
+    - kube_token_creation
diff --git a/ansible/playbooks/kube_token_distribution.yaml b/ansible/playbooks/kube_token_distribution.yaml
new file mode 100644 (file)
index 0000000..03dd656
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: kube_token_creation.yaml
+- hosts: caas_nodes
+  gather_facts: false
+  roles:
+    - kube_token_distribution
+  become: true
+  become_user: "root"
diff --git a/ansible/playbooks/kubernetes_ceph.yaml b/ansible/playbooks/kubernetes_ceph.yaml
new file mode 100644 (file)
index 0000000..e875ffc
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: kubedns.yaml
+- hosts: caas_master
+  strategy: free
+  become: true
+  become_user: "{{ users.admin_user_name }}"
+  roles:
+    - kubernetes_ceph
diff --git a/ansible/playbooks/master_kube_proxy.yaml b/ansible/playbooks/master_kube_proxy.yaml
new file mode 100644 (file)
index 0000000..5e9688c
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: kube_master.yaml
+- hosts: caas_master
+  strategy: free
+  become: true
+  become_user: "root"
+  roles:
+    - role: kube_proxy
+
diff --git a/ansible/playbooks/master_kubelet.yaml b/ansible/playbooks/master_kubelet.yaml
new file mode 100644 (file)
index 0000000..51594bf
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: kube_token_distribution.yaml
+- hosts: caas_master
+  strategy: free
+  roles:
+    - kubelet
+  become: true
+  become_user: "root"
+
diff --git a/ansible/playbooks/service_account_creation.yaml b/ansible/playbooks/service_account_creation.yaml
new file mode 100644 (file)
index 0000000..8ec55c9
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: etcd.yaml
+- hosts: installation_controller:&caas_master
+  strategy: free
+  become: true
+  become_user: "{{ users.admin_user_name }}"
+  gather_facts: false
+  roles:
+    - service_account_creation
diff --git a/ansible/playbooks/service_account_distribution.yaml b/ansible/playbooks/service_account_distribution.yaml
new file mode 100644 (file)
index 0000000..9e1635a
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# cmframework.requires: service_account_creation.yaml
+- hosts: caas_master
+  strategy: free
+  become: true
+  become_user: "{{ users.admin_user_name }}"
+  gather_facts: false
+  roles:
+    - service_account_distribution
diff --git a/ansible/roles/kube_master/defaults/main.yaml b/ansible/roles/kube_master/defaults/main.yaml
new file mode 100644 (file)
index 0000000..bc71bb9
--- /dev/null
@@ -0,0 +1,83 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiserver_admission_controllers:
+  - DefaultStorageClass
+  - LimitRanger
+  - MutatingAdmissionWebhook
+  - NamespaceExists
+  - NamespaceLifecycle
+  - NodeRestriction
+  - PodSecurityPolicy
+  - ResourceQuota
+  - ServiceAccount
+  - ValidatingAdmissionWebhook
+
+apiserver_feature_gates:
+  CPUManager: false
+  DevicePlugins: true
+  HugePages: true
+  TokenRequest: true
+
+apiserver_params:
+  - "--admission-control={{ apiserver_admission_controllers | join(',') }}"
+  - "--advertise-address={{ apiserver }}"
+  - "--allow-privileged=true"
+  - "--anonymous-auth=false"
+  - "--apiserver-count={{ groups['caas_master']|length|int }}"
+  - "--audit-policy-file={{ caas.caas_policy_directory }}/audit-policy.yaml"
+  - "--audit-log-format=json"
+  - "--audit-log-maxbackup=10"
+  - "--audit-log-maxsize=100"
+  - "--audit-log-path=/var/log/audit/kube_apiserver/kube-apiserver-audit.log"
+  - "--authorization-mode=Node,RBAC"
+  - "--bind-address={{ apiserver }}"
+  - "--client-ca-file=/etc/openssl/ca.pem"
+  - "--enable-bootstrap-token-auth=true"
+  - "--etcd-cafile=/etc/etcd/ssl/ca.pem"
+  - "--etcd-certfile=/etc/etcd/ssl/etcd{{ nodeindex }}.pem"
+  - "--etcd-keyfile=/etc/etcd/ssl/etcd{{ nodeindex }}-key.pem"
+  - "--etcd-servers={% for host in groups['caas_master'] %}https://{{ hostvars[host]['networking']['infra_internal']['ip'] }}:{{ caas.etcd_api_port }}{% if not loop.last %},{% endif %}{% endfor %}"
+  - "--experimental-encryption-provider-config={{ caas.cert_path }}/{{ caas._secrets_conf }}"
+  - "--feature-gates={{ apiserver_feature_gates | get_kube_options }}"
+  - "--insecure-port=0"
+  - "--kubelet-certificate-authority=/etc/openssl/ca.pem"
+  - "--kubelet-client-certificate=/etc/kubernetes/ssl/kubelet-server.pem"
+  - "--kubelet-client-key=/etc/kubernetes/ssl/kubelet-server-key.pem"
+  - "--kubelet-https=true"
+  - "--max-requests-inflight=1000"
+  - "--proxy-client-cert-file=/etc/kubernetes/ssl/metrics.crt"
+  - "--proxy-client-key-file=/etc/kubernetes/ssl/metrics.key"
+  - "--requestheader-client-ca-file=/etc/openssl/ca.pem"
+  - "--requestheader-extra-headers-prefix=X-Remote-Extra-"
+  - "--requestheader-group-headers=X-Remote-Group"
+  - "--requestheader-username-headers=X-Remote-User"
+  - "--secure-port={{ apiserver_port }}"
+  - "--service-account-key-file=/etc/kubernetes/ssl/service-account.pem"
+  - "--service-account-lookup=true"
+  - "--service-cluster-ip-range={{ caas.service_cluster_ip_cidr }}"
+  - "--tls-cert-file=/etc/kubernetes/ssl/tls-cert.pem"
+  - "--tls-private-key-file=/etc/kubernetes/ssl/apiserver{{ nodeindex }}-key.pem"
+  - "--token-auth-file={{ caas.cert_path }}/{{ caas.tokenscsv_filename }}"
+
+controllermanager_feature_gates:
+  CPUManager: false
+  DevicePlugins: true
+  HugePages: true
+
+scheduler_feature_gates:
+  CPUManager: false
+  DevicePlugins: true
+  HugePages: true
diff --git a/ansible/roles/kube_master/meta/main.yml b/ansible/roles/kube_master/meta/main.yml
new file mode 100644 (file)
index 0000000..df11978
--- /dev/null
@@ -0,0 +1,99 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+dependencies:
+  - role: creategroup
+    _name: kube
+    _gid: "{{ caas.uid.kube }}"
+    become: true
+    become_user: "root"
+
+  - role: createuser
+    _name: kube
+    _group: kube
+    _groups: ''
+    _shell: /sbin/nologin
+    _home: /
+    _uid: "{{ caas.uid.kube }}"
+    become: true
+    become_user: "root"
+
+  # apiserver cert
+  - role: cert
+    instance: "apiserver{{ nodeindex }}"
+    cert_path: /etc/kubernetes/ssl
+    common_name: "system:apiserver"
+    alt_names:
+      dns:
+        - "{{ caas.apiserver_service_name}}"
+        - "{{ caas.apiserver_in_hosts }}"
+      ip:
+        - "{{ ansible_host }}"
+        - "{{ caas.apiserver_svc_ip }}"
+    add_users:
+      - kube
+    become: true
+    become_user: "root"
+  # kube-controller-manager cert
+  - role: cert
+    instance: "kube-controller-manager{{ nodeindex }}"
+    cert_path: /etc/kubernetes/ssl
+    common_name: "system:kube-controller-manager"
+    org_name: "system:masters"
+    alt_names:
+      ip:
+        - "{{ ansible_host }}"
+    add_users:
+      - kube
+    kube_conf:
+      - path: "/etc/kubernetes/kubeconfig/cmc.yml"
+        apiserver: "{{ caas.apiserver_svc_ip }}"
+        apiserver_port: "{{ caas.apiserver_svc_port }}"
+    become: true
+    become_user: "root"
+  # scheduler cert
+  - role: cert
+    instance: "kube-scheduler{{ nodeindex }}"
+    cert_path: /etc/kubernetes/ssl
+    common_name: "system:kube-scheduler"
+    alt_names:
+      ip:
+        - "{{ ansible_host }}"
+    add_users:
+      - kube
+    kube_conf:
+      - path: "/etc/kubernetes/kubeconfig/schedulerc.yml"
+        apiserver: "{{ caas.apiserver_svc_ip }}"
+        apiserver_port: "{{ caas.apiserver_svc_port }}"
+    become: true
+    become_user: "root"
+
+  - role: cert
+    instance: "metrics"
+    cert_name: "metrics.crt"
+    key_name: "metrics.key"
+    common_name: "metrics"
+    cert_path: /etc/kubernetes/ssl
+    alt_names:
+      dns:
+        - custom-metrics-apiserver.kube-system.svc.nokia.net
+    add_users:
+      - kube
+    become: true
+    become_user: "root"
+
+  - role: docker_image_load
+    images:
+      - hyperkube
diff --git a/ansible/roles/kube_master/tasks/main.yml b/ansible/roles/kube_master/tasks/main.yml
new file mode 100644 (file)
index 0000000..49f7499
--- /dev/null
@@ -0,0 +1,141 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: concat certs for apiserver part 1
+  shell: "cat {{ caas.cert_path }}/apiserver{{ nodeindex }}.pem > {{ caas.cert_path }}/tls-cert.pem"
+  become_user: "root"
+
+- name: concat certs for apiserver part 2
+  shell: "cat {{ caas.cert_path }}/ca.pem >> {{ caas.cert_path }}/tls-cert.pem"
+  become_user: "root"
+
+- name: reducing permission of key file and cert file
+  file:
+    path: "{{ caas.cert_path }}/tls-cert.pem"
+    mode: 0000
+  become_user: "root"
+
+- name: adding default acl read to {{ users.admin_user_name }} to {{ caas.cert_path }}/tls-cert.epm
+  acl:
+    name:  "{{ caas.cert_path }}/tls-cert.pem"
+    entity: "{{ users.admin_user_name }}"
+    etype: user
+    permissions: r
+    state: present
+  become_user: "root"
+
+- name: adding default acl read to kube to {{ cert_path }}/tls-cert.epm
+  acl:
+    name:  "{{ caas.cert_path }}/tls-cert.pem"
+    entity: "kube"
+    etype: user
+    permissions: r
+    state: present
+  become_user: "root"
+
+- name: set permission ca.pem and ca-key.pem
+  acl:
+    name: "{{ item }}"
+    entity: "kube"
+    etype: user
+    permissions: r
+    state: present
+  with_items:
+    - "/etc/openssl/ca.pem"
+    - "/etc/openssl/ca-key.pem"
+  become_user: "root"
+
+- name: create directory for kubernetes_audit_log
+  file:
+    path: /var/log/audit/kube_apiserver
+    recurse: yes
+    owner: "{{ caas.uid.kube }}"
+    group: "{{ caas.uid.kube }}"
+    state: directory
+  become_user: "root"
+
+- name: create directory for audit policy
+  file:
+    path: "{{ caas.caas_policy_directory }}"
+    state: directory
+    recurse: yes
+  become_user: "root"
+
+- name: template audit policy
+  template:
+    src: audit-policy.yaml
+    dest: "{{ caas.caas_policy_directory }}/audit-policy.yaml"
+    mode: 0000
+  become_user: "root"
+
+- name: set permission to audit-policy.yaml
+  acl:
+    name:  "{{ caas.caas_policy_directory }}/audit-policy.yaml"
+    entity: "{{ item }}"
+    etype: user
+    permissions: r
+    state: present
+  with_items:
+    - "{{ caas.uid.kube }}"
+    - "{{ users.admin_user_name }}"
+  become_user: "root"
+
+- name: template apiserver
+  vars:
+    apiserver: "{{ ansible_host }}"
+    apiserver_port: "{{ caas.apiserver_secure_port }}"
+  template:
+    src: apiserver.yml
+    dest: /etc/kubernetes/manifests/apiserver.yml
+  become_user: "root"
+
+- name: wait for container to start
+  wait_for:
+    host: "{{ ansible_host }}"
+    port: "{{ caas.apiserver_secure_port }}"
+    state: started
+    timeout: "{{ caas.container_wait_timeout }}"
+
+- name: check for namespace
+  command: '/usr/bin/curl -I
+            https://{{ ansible_host }}:{{ caas.apiserver_secure_port }}/api/v1/namespaces/kube-system
+                    --key /etc/kubernetes/ssl/kubelet{{ nodeindex }}-key.pem
+                    --cert /etc/kubernetes/ssl/kubelet{{ nodeindex }}.pem
+                    --cacert /etc/openssl/ca.pem'
+  register: namespace_check
+  ignore_errors: yes
+
+- name: insert namespace
+  command: '/usr/bin/curl -i
+                https://{{ ansible_host }}:{{ caas.apiserver_secure_port }}/api/v1/namespaces
+                -X POST
+                -H "Content-Type: application/json"
+                --key /etc/kubernetes/ssl/kubelet{{ nodeindex }}-key.pem
+                --cert /etc/kubernetes/ssl/kubelet{{ nodeindex }}.pem
+                --cacert /etc/openssl/ca.pem
+                -d ''{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"kube-system"}}'''
+  when: namespace_check.stdout.find('200 OK') != -1
+
+- name: template manifests
+  vars:
+    apiserver: "{{ caas.apiserver_svc_ip }}"
+    apiserver_port: "{{ caas.apiserver_svc_port }}"
+  template:
+    src: "{{ item }}"
+    dest: "/etc/kubernetes/manifests/{{ item }}"
+  with_items:
+    - cm.yml
+    - scheduler.yml
+  become_user: "root"
diff --git a/ansible/roles/kube_master/templates/apiserver.yml b/ansible/roles/kube_master/templates/apiserver.yml
new file mode 100644 (file)
index 0000000..d083f1c
--- /dev/null
@@ -0,0 +1,63 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+---
+apiVersion: v1
+kind: Pod
+metadata:
+  name: kube-apiserver
+  namespace: kube-system
+spec:
+  hostNetwork: true
+  containers:
+    - name: kube-apiserver
+      image: {{ container_image_names | select('search', '/hyperkube') | list | last }}
+      securityContext:
+        runAsUser: {{ caas.uid.kube }}
+      command:
+        - "/kube-apiserver"
+        {{ apiserver_params | to_nice_yaml | indent(8) }}
+      volumeMounts:
+        - name: secret-kubernetes
+          mountPath: /etc/kubernetes/ssl
+          readOnly: true
+        - name: secret-root-ca
+          mountPath: /etc/openssl/ca.pem
+          readOnly: true
+        - name: secret-etcd
+          mountPath: /etc/etcd/ssl
+          readOnly: true
+        - name: audit-kube-apiserver
+          mountPath: /var/log/audit/kube_apiserver/
+          readOnly: false
+        - name: audit-policy-dir
+          mountPath: {{ caas.caas_policy_directory }}
+          readOnly: true
+  volumes:
+    - name: secret-kubernetes
+      hostPath:
+        path: /etc/kubernetes/ssl
+    - name: secret-root-ca
+      hostPath:
+        path: /etc/openssl/ca.pem
+    - name: secret-etcd
+      hostPath:
+        path: /etc/etcd/ssl
+    - name: audit-kube-apiserver
+      hostPath:
+        path: /var/log/audit/kube_apiserver/
+    - name: audit-policy-dir
+      hostPath:
+        path: {{ caas.caas_policy_directory }}
diff --git a/ansible/roles/kube_master/templates/audit-policy.yaml b/ansible/roles/kube_master/templates/audit-policy.yaml
new file mode 100644 (file)
index 0000000..bf66c8e
--- /dev/null
@@ -0,0 +1,23 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+---
+apiVersion: audit.k8s.io/v1beta1
+kind: Policy
+metadata:
+  name: kube-apiserver-audit-policy
+  namespace: kube-system
+rules:
+- level: Request
diff --git a/ansible/roles/kube_master/templates/cm.yml b/ansible/roles/kube_master/templates/cm.yml
new file mode 100644 (file)
index 0000000..ddd616a
--- /dev/null
@@ -0,0 +1,75 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+---
+apiVersion: v1
+kind: Pod
+metadata:
+  name: kube-controller-manager
+  namespace: kube-system
+spec:
+  hostNetwork: true
+  dnsPolicy: ClusterFirst
+  containers:
+    - name: kube-controller-manager
+      image: {{ container_image_names | select('search', '/hyperkube') | list | last }}
+      securityContext:
+        runAsUser: {{ caas.uid.kube }}
+      command:
+        - "/kube-controller-manager"
+        - "--feature-gates={{ controllermanager_feature_gates | get_kube_options }}"
+        - "--horizontal-pod-autoscaler-use-rest-clients=true"
+        - "--kubeconfig=/etc/kubernetes/kubeconfig/cmc.yml"
+        - "--service-account-private-key-file=/etc/kubernetes/ssl/service-account-key.pem"
+        - "--root-ca-file=/etc/openssl/ca.pem"
+        - "{% if groups['caas_master']|length|int > 1 %}--leader-elect=true{% endif %}"
+        - "--cluster-cidr=10.244.0.0/16"
+        - "--use-service-account-credentials=true"
+        - "--allocate-node-cidrs=true"
+        - "--cluster-signing-cert-file=/etc/openssl/ca.pem"
+        - "--cluster-signing-key-file=/etc/openssl/ca-key.pem"
+      livenessProbe:
+        httpGet:
+          host: 127.0.0.1
+          path: /healthz
+          port: 10252
+        initialDelaySeconds: 15
+        timeoutSeconds: 1
+      volumeMounts:
+        - name: secret-kubernetes
+          mountPath: /etc/kubernetes/ssl
+          readOnly: true
+        - name: secret-root-ca
+          mountPath: /etc/openssl/ca.pem
+          readOnly: true
+        - name: secret-root-ca-key
+          mountPath: /etc/openssl/ca-key.pem
+          readOnly: true
+        - name: kubeconfig
+          mountPath: /etc/kubernetes/kubeconfig
+          readOnly: true
+  volumes:
+    - name: secret-kubernetes
+      hostPath:
+        path: /etc/kubernetes/ssl
+    - name: secret-root-ca
+      hostPath:
+        path: /etc/openssl/ca.pem
+    - name: secret-root-ca-key
+      hostPath:
+        path: /etc/openssl/ca-key.pem
+    - name: kubeconfig
+      hostPath:
+        path: /etc/kubernetes/kubeconfig
diff --git a/ansible/roles/kube_master/templates/scheduler.yml b/ansible/roles/kube_master/templates/scheduler.yml
new file mode 100644 (file)
index 0000000..076b969
--- /dev/null
@@ -0,0 +1,63 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+---
+apiVersion: v1
+kind: Pod
+metadata:
+  name: kube-scheduler
+  namespace: kube-system
+spec:
+  hostNetwork: true
+  dnsPolicy: ClusterFirst
+  containers:
+    - name: kube-scheduler
+      image: {{ container_image_names | select('search', '/hyperkube') | list | last }}
+      securityContext:
+        runAsUser: {{ caas.uid.kube }}
+      command:
+        - "/kube-scheduler"
+        - "--feature-gates={{ scheduler_feature_gates | get_kube_options }}"
+        - "--kubeconfig=/etc/kubernetes/kubeconfig/schedulerc.yml"
+{% if groups['caas_master']|length|int > 1 %}
+        - "--leader-elect=true"
+{% endif %}
+      livenessProbe:
+        httpGet:
+          host: 127.0.0.1
+          path: /healthz
+          port: 10251
+          initialDelaySeconds: 15
+          timeoutSeconds: 1
+      volumeMounts:
+        - name: secret-kubernetes
+          mountPath: /etc/kubernetes/ssl
+          readOnly: true
+        - name: secret-root-ca
+          mountPath: /etc/openssl/ca.pem
+          readOnly: true
+        - name: kubeconfig
+          mountPath: /etc/kubernetes/kubeconfig
+          readOnly: true
+  volumes:
+    - name: secret-kubernetes
+      hostPath:
+        path: /etc/kubernetes/ssl
+    - name: secret-root-ca
+      hostPath:
+        path: /etc/openssl/ca.pem
+    - name: kubeconfig
+      hostPath:
+        path: /etc/kubernetes/kubeconfig
diff --git a/ansible/roles/kube_proxy/meta/main.yaml b/ansible/roles/kube_proxy/meta/main.yaml
new file mode 100644 (file)
index 0000000..e00eece
--- /dev/null
@@ -0,0 +1,62 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+dependencies:
+  - role: creategroup
+    _name: kube
+    _gid: "{{ caas.uid.kube }}"
+    become: true
+    become_user: "root"
+  
+  - role: createuser
+    _name: kube
+    _group: kube
+    _groups: ''
+    _shell: /sbin/nologin
+    _home: /
+    _uid: "{{ caas.uid.kube }}"
+    become: true
+    become_user: "root"
+
+  - role: cert
+    instance: "kube-proxy"
+    cert_path: /etc/kubernetes/ssl
+    common_name: "system:kube-proxy"
+    add_users:
+      - kube
+    kube_conf:
+      - path: "/etc/kubernetes/kubeconfig/proxyc.yml"
+        apiserver: "{{ ansible_host }}"
+        apiserver_port: "{{ caas.apiserver_secure_port }}"
+    become: true
+    become_user: "root"
+    when: nodetype | search("caas_master")
+  - role: cert
+    instance: "kube-proxy"
+    cert_path: /etc/kubernetes/ssl
+    common_name: "system:kube-proxy"
+    add_users:
+      - kube
+    kube_conf:
+      - path: "/etc/kubernetes/kubeconfig/proxyc.yml"
+        apiserver: "{{ caas.apiserver_in_hosts }}"
+        apiserver_port: "{{ caas.apiserver_secure_port }}"
+    become: true
+    become_user: "root"
+    when: not nodetype | search("caas_master")
+
+  - role: docker_image_load
+    images:
+      - hyperkube
diff --git a/ansible/roles/kube_proxy/tasks/main.yml b/ansible/roles/kube_proxy/tasks/main.yml
new file mode 100644 (file)
index 0000000..d36e098
--- /dev/null
@@ -0,0 +1,25 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: template manifest
+  template:
+    src: kube-proxy.yml
+    dest: /etc/kubernetes/manifests/kube-proxy.yml
+
+- name: Wait 300 seconds for  API server service ip , don't start checking for 10 seconds
+  wait_for:
+    host: "{{ caas.apiserver_svc_ip }}"
+    port: "{{ caas.apiserver_svc_port }}"
+    delay: 10
diff --git a/ansible/roles/kube_proxy/templates/kube-proxy.yml b/ansible/roles/kube_proxy/templates/kube-proxy.yml
new file mode 100644 (file)
index 0000000..5aff9ad
--- /dev/null
@@ -0,0 +1,53 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+---
+apiVersion: v1
+kind: Pod
+metadata:
+  name: kube-proxy
+  namespace: kube-system
+spec:
+  hostNetwork: true
+  containers:
+    - name: kube-proxy
+      image: {{ container_image_names | select('search', '/hyperkube') | list | last }}
+      securityContext:
+        privileged: true
+      command:
+        - "/kube-proxy"
+        - "--kubeconfig=/etc/kubernetes/kubeconfig/proxyc.yml"
+        - "--hostname-override={{ ansible_host }}"
+        - "--masquerade-all=true"
+      volumeMounts:
+        - name: secret-kubernetes
+          mountPath: /etc/kubernetes/ssl
+          readOnly: true
+        - name: secret-root-ca
+          mountPath: /etc/openssl/ca.pem
+          readOnly: true
+        - name: kubeconfig
+          mountPath: /etc/kubernetes/kubeconfig
+          readOnly: true
+  volumes:
+    - name: secret-kubernetes
+      hostPath:
+        path: /etc/kubernetes/ssl
+    - name: secret-root-ca
+      hostPath:
+        path: /etc/openssl/ca.pem
+    - name: kubeconfig
+      hostPath:
+        path: /etc/kubernetes/kubeconfig
diff --git a/ansible/roles/kube_secret_key_creation/tasks/main.yml b/ansible/roles/kube_secret_key_creation/tasks/main.yml
new file mode 100644 (file)
index 0000000..65ad5ec
--- /dev/null
@@ -0,0 +1,41 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: check instance secret
+  stat:
+    path: "{{ caas.cert_path }}/{{ caas._secrets_conf }}"
+  register: secrets_conf
+
+- name: Generate key
+  command: "bash -c \"head -c 32 /dev/urandom | base64 -i - \""
+  register: kube_secret_enc_key
+  no_log: True
+  when: not secrets_conf.stat.exists
+
+- name: template secrets.conf
+  template:
+    src: "secrets.conf"
+    dest: "{{ caas.cert_path }}/{{ caas._secrets_conf }}"
+    mode: 0000
+  when: not secrets_conf.stat.exists
+
+- name: adding default acl read to {{ users.admin_user_name }} to {{ caas.cert_path }}/{{ caas._secrets_conf }}
+  acl:
+    name:  "{{ caas.cert_path }}/{{ caas._secrets_conf }}"
+    entity: "{{ users.admin_user_name }}"
+    etype: user
+    permissions: rx
+    state: present
+  when: not secrets_conf.stat.exists
diff --git a/ansible/roles/kube_secret_key_creation/templates/secrets.conf b/ansible/roles/kube_secret_key_creation/templates/secrets.conf
new file mode 100644 (file)
index 0000000..1194026
--- /dev/null
@@ -0,0 +1,25 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+kind: EncryptionConfig
+apiVersion: v1
+resources:
+  - resources:
+    - secrets
+    providers:
+    - aescbc:
+        keys:
+        - name: key1
+          secret: {{ kube_secret_enc_key.stdout }}
diff --git a/ansible/roles/kube_secret_key_distribution/tasks/main.yml b/ansible/roles/kube_secret_key_distribution/tasks/main.yml
new file mode 100644 (file)
index 0000000..22aa12f
--- /dev/null
@@ -0,0 +1,59 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: adding acl read to write cert_path
+  acl:
+    name:  "{{ caas.cert_path }}"
+    entity: "{{ users.admin_user_name }}"
+    etype: user
+    permissions: rwx
+    state: present
+  when: not nodename | search("caas_master1")
+  become_user: "root"
+
+# Kube secrets distribution
+- name: Get kube secrets.conf
+  shell: 'rsync -a -e "ssh -o StrictHostKeyChecking=no" {{ users.admin_user_name }}@{{ groups.caas_master[0] }}:{{ caas.cert_path }}/{{ caas._secrets_conf }} {{ caas.cert_path }}/'
+  become_user: "{{ users.admin_user_name }}"
+  when: not nodename | search("caas_master1")
+
+- file:
+    path: "{{ caas.cert_path }}/{{ caas._secrets_conf }}"
+    owner: root
+    group: root
+  become_user: "root"
+
+- name: allowing users to access keys
+  acl:
+    name: "{{ item[0] }}"
+    entity: "{{ item[1] }}"
+    etype: user
+    permissions: "r"
+    state: present
+  with_nested:
+    - [ "{{ caas.cert_path }}/{{ caas._secrets_conf }}" ]
+    - "{{ caas.kubernetes_secret_users | default([]) }}"
+  become_user: "root"
+
+- name: removing write permission from cert_path
+  acl:
+    name:  "{{ caas.cert_path }}"
+    entity: "{{ users.admin_user_name }}"
+    etype: user
+    permissions: rx
+    state: present
+  when: not nodename | search("caas_master1")
+  become_user: "root"
+
diff --git a/ansible/roles/kube_token_creation/tasks/main.yml b/ansible/roles/kube_token_creation/tasks/main.yml
new file mode 100644 (file)
index 0000000..6b440aa
--- /dev/null
@@ -0,0 +1,74 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: create directory for kube token
+  file:
+    path: "{{ caas.cert_path }}"
+    state: directory
+    recurse: yes
+
+- name: Check token
+  stat:
+    path: "{{ caas.cert_path }}/{{ caas.token_filename }}"
+  register: token_file
+
+- name: Generate token
+  shell: "head -c 16 /dev/urandom | od -An -t x | tr -d ' '"
+  register: kube_token_output
+  no_log: true
+  when: not token_file.stat.exists
+
+- name: Set token fact
+  set_fact:
+    kube_token: "{{ kube_token_output.stdout }}"
+  no_log: true
+  when: not token_file.stat.exists
+
+- name: Save token
+  copy:
+    content: "{{ kube_token }}"
+    dest: "{{ caas.cert_path }}/{{ caas.token_filename }}"
+  when: not token_file.stat.exists
+
+- name: Set permissions on token
+  acl:
+    name:  "{{ caas.cert_path }}/{{ caas.token_filename }}"
+    entity: "{{ item }}"
+    etype: user
+    permissions: r
+    state: present
+  when: not token_file.stat.exists
+  with_items:
+    - "{{ users.admin_user_name }}"
+    - "kube"
+
+- name: Generate tokens.csv
+  template:
+    src: "tokens.csv"
+    dest: "{{ caas.cert_path }}/{{ caas.tokenscsv_filename }}"
+    mode: 0000
+  when: not token_file.stat.exists
+
+- name: Set permissions on tokens.csv
+  acl:
+    name:  "{{ caas.cert_path }}/{{ caas.tokenscsv_filename }}"
+    entity: "{{ item }}"
+    etype: user
+    permissions: r
+    state: present
+  when: not token_file.stat.exists
+  with_items:
+    - "{{ users.admin_user_name }}"
+    - "kube"
diff --git a/ansible/roles/kube_token_creation/templates/tokens.csv b/ansible/roles/kube_token_creation/templates/tokens.csv
new file mode 100644 (file)
index 0000000..d8e89df
--- /dev/null
@@ -0,0 +1,17 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+{{ kube_token }},kubelet-bootstrap,10001,"system:bootstrappers"
+
diff --git a/ansible/roles/kube_token_distribution/tasks/main.yml b/ansible/roles/kube_token_distribution/tasks/main.yml
new file mode 100644 (file)
index 0000000..1d2f5fb
--- /dev/null
@@ -0,0 +1,66 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: Create directory for kube token
+  file:
+    path: "{{ caas.cert_path }}"
+    state: directory
+    recurse: yes
+
+- name: Check token
+  stat:
+    path: "{{ caas.cert_path }}/{{ caas.token_filename }}"
+  register: token_file
+  when: not nodename | search("caas_master")
+
+- name: adding acl read to write cert_path
+  acl:
+    name:  "{{ caas.cert_path }}"
+    entity: "{{ users.admin_user_name }}"
+    etype: user
+    permissions: rwx
+    state: present
+
+- name: Send kube token
+  synchronize:
+    src: "{{ caas.cert_path }}/{{ caas.token_filename }}"
+    dest: "{{ caas.cert_path }}/{{ caas.token_filename }}"
+    rsync_opts:
+      - "-A"
+      - "-X"
+  when: not nodename | search("caas_master") and not token_file.stat.exists
+
+- name: Check token
+  stat:
+    path: "{{ caas.cert_path }}/{{ caas.tokenscsv_filename }}"
+  register: tokencsv_file
+  when: nodename | search("caas_master") and not nodename | search("caas_master1")
+
+- name: Get kube tokens.csv
+  synchronize:
+    src: "{{ caas.cert_path }}/{{ caas.tokenscsv_filename }}"
+    dest: "{{ caas.cert_path }}/{{ caas.tokenscsv_filename }}"
+    rsync_opts:
+      - "-A"
+      - "-X"
+  when: nodename | search("caas_master") and not nodename | search("caas_master1") and not tokencsv_file.stat.exists
+
+- name: remove acl read to write cert_path
+  acl:
+    name:  "{{ caas.cert_path }}"
+    entity: "{{ users.admin_user_name }}"
+    etype: user
+    permissions: rx
+    state: present
diff --git a/ansible/roles/kube_token_reading/tasks/main.yaml b/ansible/roles/kube_token_reading/tasks/main.yaml
new file mode 100644 (file)
index 0000000..313f0e2
--- /dev/null
@@ -0,0 +1,19 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+  - name: read kubelet bootstrap token
+    set_fact:
+      kube_token: "{{ lookup('file', '{{ caas.cert_path }}/{{ caas.token_filename }}') }}"
+    no_log: true
diff --git a/ansible/roles/kubeconfig/tasks/main.yml b/ansible/roles/kubeconfig/tasks/main.yml
new file mode 100644 (file)
index 0000000..f23d59f
--- /dev/null
@@ -0,0 +1,68 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: create directory
+  file:
+    name: "{{ config.path | dirname }}"
+    state: directory
+    mode: 0755
+    owner: "{{ config.owner | default('root') }}"
+    group: "{{ config.group | default('root') }}"
+
+- name: create kubeconfig
+  command: "/usr/bin/kubectl config {{ cmd }} --kubeconfig={{ config.path }}"
+  with_items:
+    - "set-cluster kubernetes --certificate-authority=/etc/openssl/ca.pem --embed-certs=true --server=https://{{ config.apiserver }}:{{ config.apiserver_port }}"
+    - "set-context default --cluster=kubernetes --user={{ config.user }}"
+    - "use-context default"
+  loop_control:
+    loop_var: cmd
+
+- name: set user auth with token
+  command: "/usr/bin/kubectl config set-credentials {{ config.user }} --token={{ config.token }} --kubeconfig={{ config.path }}"
+  when: config.token is defined and config.token
+
+- name: set user auth with certs
+  command: "/usr/bin/kubectl config set-credentials {{ config.user }} --client-certificate={{ config.cert }} --client-key={{ config.key }} --embed-certs=true --kubeconfig={{ config.path }}"
+  when: not (config.token is defined and config.token)
+
+- name: changing permissions of kubeconfig
+  file:
+    path: "{{ config.path }}"
+    mode: "{{ config.restricted | default(true) | ternary('0640', '0644') }}"
+    owner: "{{ config.owner | default('root') }}"
+    group: "{{ config.group | default('root') }}"
+
+- name: allowing users to access kubeconfig
+  acl:
+    name: "{{ config.path }}"
+    entity: "{{ user }}"
+    etype: user
+    permissions: "r"
+    state: present
+  with_items: "{{ config.add_users | default([]) }}"
+  loop_control:
+    loop_var: user
+
+- name: adding read permission to kubeconfig dir
+  acl:
+    name: "{{ config.path | dirname }}"
+    entity: "{{ user }}"
+    etype: user
+    permissions: "rx"
+    state: present
+  with_items: "{{ config.add_users | default([]) }}"
+  loop_control:
+    loop_var: user
diff --git a/ansible/roles/kubelet/defaults/main.yaml b/ansible/roles/kubelet/defaults/main.yaml
new file mode 100644 (file)
index 0000000..1bf3c9a
--- /dev/null
@@ -0,0 +1,36 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+kubelet_kubeconfig_path: "{% if nodename | search('caas_master') %}/etc/kubernetes/kubeconfig/kubeletc.yml{% else %}/root/kubeletc.yml{% endif %}"
+
+common_kubelet_params:
+  - "--hostname-override={{ networking.infra_internal.ip }}"
+  - "--kubeconfig={{ kubelet_kubeconfig_path }}"
+  - "--network-plugin=cni"
+  - "--node-labels={{ lookup('template', 'node_labels.j2') | trim }}"
+  - "--pod-infra-container-image={{ container_image_names | select('search', '/kubernetespause') | list | last }}"
+  - "--register-node=true"
+
+master_kubelet_params:
+  - "--config=/etc/kubernetes/kubeconfig/master-config.yaml"
+
+worker_kubelet_params:
+  - "--bootstrap-kubeconfig=/etc/kubernetes/kubeconfig/kubelet-bootstrapc.yml"
+  - "--config=/etc/kubernetes/kubeconfig/worker-config.yaml"
+
+kubectl_configs:
+  - path: "/home/{{ users.admin_user_name }}/.kube/config"
+    owner: "{{ users.admin_user_name }}"
+    group: "{{ users.admin_user_name }}"
diff --git a/ansible/roles/kubelet/meta/main.yml b/ansible/roles/kubelet/meta/main.yml
new file mode 100644 (file)
index 0000000..62c95fa
--- /dev/null
@@ -0,0 +1,104 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+dependencies:
+  - role: kube_token_reading
+    when: nodename | search("caas_worker")
+
+  - role: creategroup
+    _name: kube
+    _gid: "{{ caas.uid.kube }}"
+    become: true
+    become_user: "root"
+
+  - role: createuser
+    _name: kube
+    _group: kube
+    _groups: ''
+    _shell: /sbin/nologin
+    _home: /
+    _uid: "{{ caas.uid.kube }}"
+    become: true
+    become_user: "root"
+
+  # kubelet server certs
+  - role: cert
+    instance: "kubelet{{ nodeindex }}"
+    cert_path: /etc/kubernetes/ssl
+    common_name: "system:node:{{ ansible_host }}"
+    org_name: "system:nodes"
+    add_users:
+      - kube
+    kube_conf:
+      - path: /etc/kubernetes/kubeconfig/kubeletc.yml
+        apiserver: "{{ caas.apiserver_svc_ip }}"
+        apiserver_port: "{{ caas.apiserver_svc_port }}"
+        restricted: true
+    become: true
+    become_user: "root"
+    when: nodename | search("caas_master")
+  - role: kubeconfig
+    config:
+      path: /etc/kubernetes/kubeconfig/kubelet-bootstrapc.yml
+      owner: "root"
+      group: "root"
+      restricted: true
+      user: "system:node:{{ ansible_host }}"
+      token: "{{ kube_token }}"
+      apiserver: "{{ caas.apiserver_in_hosts }}"
+      apiserver_port: "{{ caas.apiserver_secure_port }}"
+      add_users:
+        - kube
+    become: true
+    become_user: "root"
+    when: nodename | search("caas_worker")
+  # kubelet server cert
+  - role: cert
+    instance: "kubelet-server"
+    cert_path: /etc/kubernetes/ssl
+    common_name: "kubelet-server"
+    alt_names:
+      ip:
+        - "{{ ansible_host }}"
+    add_users:
+      - kube
+  # kubectl cert
+  - role: cert
+    instance: "kube-admin"
+    cert_path: /etc/kubernetes/ssl
+    common_name: "kube-admin"
+    org_name: "system:masters"
+    kube_conf:
+      - path: "/root/.kube/config"
+        apiserver: "{{ caas.apiserver_svc_ip }}"
+        apiserver_port: "{{ caas.apiserver_svc_port }}"
+    become: true
+    become_user: "root"
+  # danm cert
+  - role: cert
+    instance: "danm"
+    cert_path: /etc/kubernetes/ssl
+    common_name: "danm"
+    kube_conf:
+      - path: "/etc/kubernetes/kubeconfig/danmc.yml"
+        apiserver: "{{ caas.apiserver_svc_ip }}"
+        apiserver_port: "{{ caas.apiserver_svc_port }}"
+    become: true
+    become_user: "root"
+
+  - role: docker_image_load
+    images:
+      - hyperkube
+      - kubernetespause
diff --git a/ansible/roles/kubelet/tasks/configure_kubelet.yml b/ansible/roles/kubelet/tasks/configure_kubelet.yml
new file mode 100644 (file)
index 0000000..7d3bd04
--- /dev/null
@@ -0,0 +1,68 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: template master kubelet config
+  template:
+    src: master-config.yaml.j2
+    dest: /etc/kubernetes/kubeconfig/master-config.yaml
+    mode: 0600
+  when: hostname in groups.caas_master
+  become_user: "root"
+
+- name: template worker kubelet config
+  template:
+    src: worker-config.yaml.j2
+    dest: /etc/kubernetes/kubeconfig/worker-config.yaml
+    mode: 0600
+  when: hostname in groups.caas_worker
+  become_user: "root"
+
+- name: assemble kubelet params for master
+  set_fact:
+    kubelet_params: "{{ common_kubelet_params + master_kubelet_params | default([], true) }}"
+  when: hostname in groups.caas_master
+
+- name: assemble kubelet params for worker
+  set_fact:
+    kubelet_params: "{{ common_kubelet_params + worker_kubelet_params | default([], true) }}"
+  when: hostname in groups.caas_worker
+
+- name: template kubelet scripts
+  template:
+    src: "{{ item }}"
+    dest: /usr/libexec/nokia/{{ item }}
+    mode: 0700
+  with_items:
+    - kubelet_start.sh
+    - kubelet_healthcheck.sh
+    - kubelet_stop.sh
+  become_user: "root"
+
+- name: template service file
+  template:
+    src: "{{ item.src }}"
+    dest: "{{ item.dest }}"
+  with_items:
+    - src: kubelet.service
+      dest: /usr/lib/systemd/system/kubelet.service
+    - src: kubelet_healthcheck.service
+      dest: /usr/lib/systemd/system/kubelet_healthcheck.service
+
+- name: create dummy kubeletc file for boostrapper nodes
+  file:
+    path: "/etc/kubernetes/kubeconfig/kubeletc.yml"
+    state: touch
+  when: hostname in groups.caas_worker
+
diff --git a/ansible/roles/kubelet/tasks/main.yml b/ansible/roles/kubelet/tasks/main.yml
new file mode 100644 (file)
index 0000000..6303b59
--- /dev/null
@@ -0,0 +1,49 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- import_tasks: preconfig.yml
+
+- name: create libs
+  file:
+    name: "{{ item }}"
+    state: directory
+  with_items:
+    - /var/lib/kubelet
+    - /var/lib/cni
+    - /etc/kubernetes/manifests
+    - /etc/kubernetes/kubeconfig
+
+- name: template env.list
+  template:
+    src: env.list
+    dest: /etc/kubernetes/env.list
+
+- import_tasks: configure_kubelet.yml
+
+- name: daemon reload
+  command: /usr/bin/systemctl daemon-reload
+
+- name: restart kubelet
+  service:
+    name: kubelet.service
+    state: started
+    enabled: true
+
+- name: restart kubelet_healthcheck
+  service:
+    name: kubelet_healthcheck.service
+    state: started
+    enabled: true
+  become_user: "root"
diff --git a/ansible/roles/kubelet/tasks/preconfig.yml b/ansible/roles/kubelet/tasks/preconfig.yml
new file mode 100644 (file)
index 0000000..39310c9
--- /dev/null
@@ -0,0 +1,34 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: create .kube directory in home directories
+  file:
+    path: "/home/{{ users.admin_user_name }}/.kube/"
+    state: directory
+    mode: 0700
+    owner: "{{ item.owner }}"
+    group: "{{ item.group }}"
+  with_items: "{{ kubectl_configs }}"
+
+- name: copy kubectl config
+  copy:
+    src: "/root/.kube/config"
+    dest: "{{ item.path }}"
+    owner: "{{ item.owner }}"
+    group: "{{ item.group }}"
+    mode: 0600
+    remote_src: yes
+  become_user: "root"
+  with_items: "{{ kubectl_configs }}"
diff --git a/ansible/roles/kubelet/templates/env.list b/ansible/roles/kubelet/templates/env.list
new file mode 100644 (file)
index 0000000..9607b05
--- /dev/null
@@ -0,0 +1,23 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+API_SERVERS=https://{{ caas.apiserver_svc_ip }}:{{ caas.apiserver_svc_port }}
+CLIENT_CA_CERT=/etc/openssl/ca.pem
+CLIENT_CERT=/etc/docker/client{{ nodeindex }}.pem
+CLIENT_KEY=/etc/docker/client{{ nodeindex }}-key.pem
+DANM_POSTFIX=kubernetes.nokia.com
+DOCKER_CERT_PATH=/etc/docker
+DOCKER_HOST=tcp://{{ ansible_host }}:2375
+DOCKER_TLS_VERIFY=1
diff --git a/ansible/roles/kubelet/templates/kubelet.service b/ansible/roles/kubelet/templates/kubelet.service
new file mode 100644 (file)
index 0000000..ba73ec5
--- /dev/null
@@ -0,0 +1,45 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+[Unit]
+Description=Kubelet
+After=docker.service
+BindsTo=docker.service
+Before=kubelet_healthcheck.service
+
+[Service]
+Slice=podruntime.slice
+MemoryAccounting=true
+CPUAccounting=true
+BlockIOAccounting=true
+TasksAccounting=true
+Type=simple
+User=root
+TimeoutStartSec=0
+TimeoutStopSec=45s
+RestartSec=10s
+EnvironmentFile=/etc/kubernetes/env.list
+
+ExecStartPre=/usr/libexec/nokia/kubelet_start.sh
+
+ExecStart=/usr/bin/kubelet {{ kubelet_params | join(' ') }}
+
+ExecStop=/usr/libexec/nokia/kubelet_stop.sh
+
+Restart=always
+LimitNOFILE=65536
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ansible/roles/kubelet/templates/kubelet_healthcheck.service b/ansible/roles/kubelet/templates/kubelet_healthcheck.service
new file mode 100644 (file)
index 0000000..70a55a3
--- /dev/null
@@ -0,0 +1,37 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+[Unit]
+Description=Kubelethealthcheck
+After=kubelet.service
+BindsTo=kubelet.service
+
+[Service]
+Slice=podruntime.slice
+MemoryAccounting=true
+CPUAccounting=true
+BlockIOAccounting=true
+TasksAccounting=true
+Type=simple
+User=root
+RestartSec=10s
+
+ExecStart=/usr/libexec/nokia/kubelet_healthcheck.sh
+
+Restart=always
+LimitNOFILE=65536
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ansible/roles/kubelet/templates/kubelet_healthcheck.sh b/ansible/roles/kubelet/templates/kubelet_healthcheck.sh
new file mode 100644 (file)
index 0000000..7cf4a08
--- /dev/null
@@ -0,0 +1,73 @@
+#!/bin/bash
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+wait_for_file () {
+  while [[ ! -f $1 ]]
+  do
+    echo "Waiting for file $1"
+    sleep 1
+  done
+}
+
+
+CERT_AUTH="/etc/openssl/ca.pem"
+CLIENT_CER="/etc/kubernetes/ssl/kubelet-server.pem"
+CLIENT_KEY="/etc/kubernetes/ssl/kubelet-server-key.pem"
+wait_for_file $CERT_AUTH
+wait_for_file $CLIENT_CER
+wait_for_file $CLIENT_KEY
+
+
+keepdoing="true"
+error=0
+
+while true
+do
+  if [[ "$keepdoing" == "true" ]]
+  then
+    echo "Waiting for kubernetes node to become ready..."
+    uncordon_ready=$( /usr/bin/kubectl get node --show-labels | grep -i "{{ nodename }}" | grep -i "ready" | grep -i "SchedulingDisabled" | wc -l )
+    if [[ "$uncordon_ready" -eq "1" ]]
+    then
+      keepdoing="false"
+      /usr/bin/kubectl uncordon {{ ansible_host }} || echo "Post start kubelet, this node was never cordoned."
+      echo "Node uncordoned, and ready!"
+    fi
+    node_ready=$( /usr/bin/kubectl get node --show-labels | grep -i "{{ nodename }}" |  grep -i " ready " | wc -l )
+    if [[ "$node_ready" -eq "1" ]]
+    then
+      keepdoing="false"
+      echo "Node become ready."
+    fi
+  fi
+  set +e
+  result="$(wget --timeout 10 --tries 5 --ca-certificate $CERT_AUTH --certificate $CLIENT_CER --private-key $CLIENT_KEY --spider https://{{ ansible_host }}:10250/healthz 2>&1 | grep 'HTTP' | grep -E -o '[[:digit:]]{3}')"
+
+  set -e
+  if [ "$result" == "200" ]
+  then
+    echo "Healtcheck success"
+    error=0
+  else
+    echo "Healtcheck failed"
+    error=$(($error+1))
+  fi
+  if [ "$error" -ge "5" ]
+  then
+    echo "Error with kubelet (Healtcheck failed 5 times) restarting it"
+    systemctl restart kubelet.service
+  fi
+  sleep 30
+done
diff --git a/ansible/roles/kubelet/templates/kubelet_start.sh b/ansible/roles/kubelet/templates/kubelet_start.sh
new file mode 100644 (file)
index 0000000..97d0daa
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash -u
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+DOCKER_ARGS="--tlsverify --tlscacert=${CLIENT_CA_CERT} --tlscert=${CLIENT_CERT} --tlskey=${CLIENT_KEY} -H ${DOCKER_HOST}"
+
+# check if kubelet is running
+kubelet_is_running=$( ps -aux | grep "/kubelet " | grep -v color | wc -l )
+if [[ "$kubelet_is_running" -ge "1" ]]
+then
+  # stop kubelet by force
+  kubeletpid=$( ps -aux | grep "/kubelet " | grep -v color | awk -F' ' '{ print $2 }' )
+  kill -9 $kubeletpid
+fi
+
+for D in /var/lib/kubelet/pods/*
+do
+  if [ -d "${D}" ]
+  then
+    rm -rf /var/lib/kubelet/pods/${D} || echo "Can not remove directory, skipping it"
+  fi
+done
+
+echo "Pre kubelet start ended."
diff --git a/ansible/roles/kubelet/templates/kubelet_stop.sh b/ansible/roles/kubelet/templates/kubelet_stop.sh
new file mode 100644 (file)
index 0000000..202c083
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/bash -u
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# check if node was active
+# if it was and node number is greater the 1, cordon and drain for graceful shutdown
+result=$( /usr/bin/kubectl get nodes | grep {{ networking.infra_internal.ip }} | wc -l )
+controllernumbers=$( /usr/bin/kubectl get node --show-labels | grep -i ready | grep caas_master | wc -l )
+if [[ "$result" -ge "1" ]] && [[ $controllernumbers -gt 1 ]]
+then
+  /usr/bin/kubectl cordon {{ networking.infra_internal.ip }}
+  /usr/bin/kubectl drain {{ networking.infra_internal.ip }}  --force --ignore-daemonsets --delete-local-data --grace-period=30
+fi
+
+# check if kubelet is running
+kubelet_is_still_running=$(  ps -aux | grep "/kubelet " | grep -v color | wc -l )
+if [[ "$kubelet_is_still_running" -ge "1" ]]
+then
+  # stop kubelet by force
+  kubeletpid=$( ps -aux | grep "/kubelet " | grep -v color | awk -F' ' '{ print $2 }')
+  kill -9 $kubeletpid
+fi
+
+for D in /var/lib/kubelet/pods/*
+do
+  if [ -d "${D}" ]
+  then
+    rm -rf /var/lib/kubelet/pods/${D} || echo "Can not remove directory, skipping it"
+  fi
+done
diff --git a/ansible/roles/kubelet/templates/master-config.yaml.j2 b/ansible/roles/kubelet/templates/master-config.yaml.j2
new file mode 100644 (file)
index 0000000..9edf406
--- /dev/null
@@ -0,0 +1,43 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+---
+apiVersion: kubelet.config.k8s.io/v1beta1
+kind: KubeletConfiguration
+address: "{{ networking.infra_internal.ip }}"
+authentication:
+  x509:
+    clientCAFile: "/etc/openssl/ca.pem"
+  webhook:
+    enabled: true
+  anonymous:
+    enabled: false
+authorization:
+  mode: "AlwaysAllow"
+cgroupsPerQOS: true
+cgroupRoot: "/"
+cgroupDriver: cgroupfs
+clusterDNS:
+- {{ caas.dns_svc_ip }}
+clusterDomain: nokia.net
+staticPodPath: "/etc/kubernetes/manifests"
+rotateCertificates: true
+runtimeRequestTimeout: 5m0s
+streamingConnectionIdleTimeout: 5m0s
+tlsCertFile: "/etc/kubernetes/ssl/kubelet-server.pem"
+tlsPrivateKeyFile: "/etc/kubernetes/ssl/kubelet-server-key.pem"
+featureGates:
+  CPUManager: false
+  DevicePlugins: true
diff --git a/ansible/roles/kubelet/templates/node_labels.j2 b/ansible/roles/kubelet/templates/node_labels.j2
new file mode 100644 (file)
index 0000000..2125fb9
--- /dev/null
@@ -0,0 +1,18 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+{%- for key, value in labels.iteritems() -%}
+{{ key }}={{ value }}{%- if not loop.last -%},{%- endif -%}
+{%- endfor -%}
diff --git a/ansible/roles/kubelet/templates/worker-config.yaml.j2 b/ansible/roles/kubelet/templates/worker-config.yaml.j2
new file mode 100644 (file)
index 0000000..613d8cc
--- /dev/null
@@ -0,0 +1,44 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+---
+apiVersion: kubelet.config.k8s.io/v1beta1
+kind: KubeletConfiguration
+address: "{{ networking.infra_internal.ip }}"
+authentication:
+  x509:
+    clientCAFile: "/etc/openssl/ca.pem"
+  webhook:
+    enabled: true
+  anonymous:
+    enabled: false
+authorization:
+  mode: "AlwaysAllow"
+cgroupsPerQOS: true
+cgroupRoot: "/"
+cgroupDriver: cgroupfs
+clusterDNS:
+- {{ caas.dns_svc_ip }}
+clusterDomain: nokia.net
+staticPodPath: "/etc/kubernetes/manifests"
+rotateCertificates: true
+runtimeRequestTimeout: 5m0s
+streamingConnectionIdleTimeout: 5m0s
+tlsCertFile: "/etc/kubernetes/ssl/kubelet-server.pem"
+tlsPrivateKeyFile: "/etc/kubernetes/ssl/kubelet-server-key.pem"
+featureGates:
+  CPUManager: false
+  DevicePlugins: true
+  RotateKubeletClientCertificate: true
diff --git a/ansible/roles/kubernetes_ceph/defaults/main.yaml b/ansible/roles/kubernetes_ceph/defaults/main.yaml
new file mode 100644 (file)
index 0000000..c25df46
--- /dev/null
@@ -0,0 +1,25 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+auth_tokens:
+  - name: admin
+    secret_name: ceph-admin
+    namespace: kube-system
+  - name: caas
+    secret_name: ceph-user
+    namespace: kube-system
+  - name: caas
+    secret_name: ceph-user
+    namespace: default
diff --git a/ansible/roles/kubernetes_ceph/meta/main.yaml b/ansible/roles/kubernetes_ceph/meta/main.yaml
new file mode 100644 (file)
index 0000000..bc8f123
--- /dev/null
@@ -0,0 +1,17 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+dependencies:
+  - role: manifests
diff --git a/ansible/roles/kubernetes_ceph/tasks/create_ceph_auth_secret.yaml b/ansible/roles/kubernetes_ceph/tasks/create_ceph_auth_secret.yaml
new file mode 100644 (file)
index 0000000..74314af
--- /dev/null
@@ -0,0 +1,38 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+  - name: get auth token
+    become: true
+    become_user: root
+    shell: "ceph auth -f json get client.{{ token.name }}"
+    register: get_auth_token
+
+  - name: extract auth token
+    set_fact:
+      ceph_auth_token: "{{ get_auth_token.stdout | from_json | map(attribute='key') | first  }}"
+
+  - name: template secret manifest
+    template:
+      src: ceph-secret.yaml.j2
+      dest: "{{ caas.manifests_directory }}/ceph-{{ token.name }}-secret.yaml"
+    vars:
+      name: "{{ token.name }}"
+      namespace: "{{ token.namespace }}"
+
+  - name: create ceph-{{ token.name }} secret
+    kubectl:
+      manifest: "{{ caas.manifests_directory }}/ceph-{{ token.name }}-secret.yaml"
+      state: present
+    when: ( nodename | search("caas_master1") )
diff --git a/ansible/roles/kubernetes_ceph/tasks/create_ceph_storage_class.yaml b/ansible/roles/kubernetes_ceph/tasks/create_ceph_storage_class.yaml
new file mode 100644 (file)
index 0000000..808050c
--- /dev/null
@@ -0,0 +1,46 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+  - name: get ceph mons
+    become: true
+    become_user: root
+    shell: "ceph mon dump -f json"
+    register: get_ceph_mons
+
+  - name: parse mons command output
+    set_fact:
+      ceph_mons_dump: "{{ get_ceph_mons.stdout | from_json }}"
+  - name: assemble mons list string
+    set_fact:
+      ceph_mons_list: "{{ ceph_mons_dump.mons | map(attribute='addr') | join(',')}}"
+
+  - name: get auth tokens
+    set_fact:
+      ceph_admin_token: "{{ auth_tokens | selectattr('name', 'search', 'admin') | first }}"
+      ceph_user_token: "{{ auth_tokens | selectattr('name', 'search', 'caas') | first }}"
+
+  - name: template storage class manifets
+    template:
+      src: ceph-storageclass.yaml.j2
+      dest: "{{ caas.manifests_directory }}/ceph-storageclass.yaml"
+    vars:
+      name: ceph-storage-class
+      pool: caas
+
+  - name: create kubernetes storage class
+    kubectl:
+      manifest: "{{ caas.manifests_directory }}/ceph-storageclass.yaml"
+      state: present
+    when: ( nodename | search("caas_master1") )
diff --git a/ansible/roles/kubernetes_ceph/tasks/main.yaml b/ansible/roles/kubernetes_ceph/tasks/main.yaml
new file mode 100644 (file)
index 0000000..d048c16
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+  - name: create kubernetes secret for Ceph auth tokens
+    include_tasks: create_ceph_auth_secret.yaml
+    with_items: "{{ auth_tokens }}"
+    loop_control:
+      loop_var: token
+
+  - name: create kubernetes storage class
+    import_tasks: create_ceph_storage_class.yaml
diff --git a/ansible/roles/kubernetes_ceph/templates/ceph-secret.yaml.j2 b/ansible/roles/kubernetes_ceph/templates/ceph-secret.yaml.j2
new file mode 100644 (file)
index 0000000..c831bfd
--- /dev/null
@@ -0,0 +1,24 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+  name: ceph-{{ name }}
+  namespace: {{ namespace }}
+type: kubernetes.io/rbd
+data:
+  key: {{ ceph_auth_token | b64encode }}
diff --git a/ansible/roles/kubernetes_ceph/templates/ceph-storageclass.yaml.j2 b/ansible/roles/kubernetes_ceph/templates/ceph-storageclass.yaml.j2
new file mode 100644 (file)
index 0000000..d698873
--- /dev/null
@@ -0,0 +1,37 @@
+{#
+Copyright 2019 Nokia
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+---
+kind: StorageClass
+apiVersion: storage.k8s.io/v1
+metadata:
+  annotations:
+    storageclass.kubernetes.io/is-default-class: "true"
+  name: "{{ name }}"
+provisioner: kubernetes.io/rbd
+parameters:
+  monitors: "{{ ceph_mons_list }}"
+  adminId: "{{ ceph_admin_token.name }}"
+  adminSecretName: "ceph-{{ ceph_admin_token.name }}"
+  adminSecretNamespace: "{{ ceph_admin_token.namespace }}"
+  pool: "{{ pool }}"
+  userId: "{{ ceph_user_token.name }}"
+  userSecretName: "ceph-{{ ceph_user_token.name }}"
+  fsType: ext4
+  imageFormat: "2"
+  imageFeatures: "layering"
+reclaimPolicy: Retain
+mountOptions:
+  - debug
diff --git a/ansible/roles/service_account_creation/meta/main.yml b/ansible/roles/service_account_creation/meta/main.yml
new file mode 100644 (file)
index 0000000..5573686
--- /dev/null
@@ -0,0 +1,42 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+dependencies:
+  - role: creategroup
+    _name: kube
+    _gid: "{{ caas.uid.kube }}"
+    become: true
+    become_user: "root"
+
+  - role: createuser
+    _name: kube
+    _group: kube
+    _groups: ''
+    _shell: /sbin/nologin
+    _home: /
+    _uid: "{{ caas.uid.kube }}"
+    become: true
+    become_user: "root"
+
+  - role: cert
+    instance: "service-account"
+    cert_name: "service-account.pem"
+    key_name: "service-account-key.pem"
+    common_name: "service-accounts"
+    cert_path: /etc/kubernetes/ssl
+    add_users:
+      - kube
+    become: true
+    become_user: "root"
diff --git a/ansible/roles/service_account_distribution/tasks/main.yml b/ansible/roles/service_account_distribution/tasks/main.yml
new file mode 100644 (file)
index 0000000..a048a4a
--- /dev/null
@@ -0,0 +1,56 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+- name: adding acl read to write cert_path
+  acl:
+    name:  "{{ caas.cert_path }}"
+    entity: "{{ users.admin_user_name }}"
+    etype: user
+    permissions: rwx
+    state: present
+  when: not nodename | search("caas_master1")
+  become_user: "root"
+
+# Service account distribution
+- name: Get service-account key from caas_master1
+  shell: 'rsync -a -e "ssh -o StrictHostKeyChecking=no" {{ users.admin_user_name }}@{{ groups.caas_master[0] }}:{{ caas.cert_path }}/{{ item }} {{ caas.cert_path }}/'
+  become_user: "{{ users.admin_user_name }}"
+  with_items:
+    - "{{ _key }}"
+    - "{{ _cert }}"
+  when: not nodename | search("caas_master1")
+
+- name: allowing users to access keys
+  acl:
+    name: "{{ item[0] }}"
+    entity: "{{ item[1] }}"
+    etype: user
+    permissions: "r"
+    state: present
+  with_nested:
+    - [ "{{ caas.cert_path }}/{{ _key }}", "{{ caas.cert_path }}/{{ _cert }}" ]
+    - "{{ add_users | default([]) }}"
+  when: not nodename | search("caas_master1")
+
+- name: removing write permission from cert_path
+  acl:
+    name:  "{{ caas.cert_path }}"
+    entity: "{{ users.admin_user_name }}"
+    etype: user
+    permissions: rx
+    state: present
+  when: not nodename | search("caas_master1")
+  become_user: "root"
+
diff --git a/ansible/roles/service_account_distribution/vars/main.yml b/ansible/roles/service_account_distribution/vars/main.yml
new file mode 100644 (file)
index 0000000..5736ff2
--- /dev/null
@@ -0,0 +1,20 @@
+---
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+cert_path: /etc/kubernetes/ssl
+_cert: "service-account.pem"
+_key: "service-account-key.pem"
+add_users:
+  - kube
diff --git a/caas-kubernetes.spec b/caas-kubernetes.spec
new file mode 100644 (file)
index 0000000..beee7b5
--- /dev/null
@@ -0,0 +1,181 @@
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+%define COMPONENT kubernetes
+%define RPM_NAME caas-%{COMPONENT}
+%define RPM_MAJOR_VERSION 1.14.0
+%define RPM_MINOR_VERSION 1
+%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
+%define KUBERNETESPAUSE_VERSION 3.1
+
+%define go_version 1.12.1
+%define ceph_version 12.2.5
+%define binary_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/binary-save
+%define docker_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build
+%define docker_save_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save
+%define built_binaries_dir /binary-save
+
+Name:           %{RPM_NAME}
+Version:        %{RPM_MAJOR_VERSION}
+Release:        %{RPM_MINOR_VERSION}%{?dist}
+Summary:        Containers as a Service %{COMPONENT} component
+License:        %{_platform_licence} and Apache License and GNU General Public License v2.0 only and GNU Lesser General Public License v2.1 only and MIT license and BSD and MIT license and ISC License and Creative Commons Attribution ShareAlike 4.0 International and Mozilla Public License and COMMON DEVELOPMENT AND DISTRIBUTION LICENSE and Lesser General Public License and Creative Commons - Public Domain and Creative Commons Public License and BSD 3-Clause License
+BuildArch:      x86_64
+Vendor:         %{_platform_vendor} and kubernetes/kubernetes unmodified
+Source0:        %{name}-%{version}.tar.gz
+
+Requires: docker-ce >= 18.09.2
+BuildRequires: docker-ce-cli >= 18.09.2
+
+# more info at: https://fedoraproject.org/wiki/Packaging:Debuginfo No build ID note in Flannel
+%global debug_package %{nil}
+
+%description
+This rpm contains the %{COMPONENT} container for CaaS subsystem.
+This container contains the %{COMPONENT} service.
+
+%prep
+%autosetup
+
+# Build Kubernetes binaries
+%build
+set -x
+docker build \
+  --network=host \
+  --no-cache \
+  --force-rm \
+  --build-arg HTTP_PROXY="${http_proxy}" \
+  --build-arg HTTPS_PROXY="${https_proxy}" \
+  --build-arg NO_PROXY="${no_proxy}" \
+  --build-arg http_proxy="${http_proxy}" \
+  --build-arg https_proxy="${https_proxy}" \
+  --build-arg no_proxy="${no_proxy}" \
+  --build-arg KUBERNETES_VERSION="%{version}" \
+  --build-arg go_version="%{go_version}" \
+  --build-arg binaries="%{built_binaries_dir}" \
+  --tag kubernetes-builder:%{IMAGE_TAG} \
+  %{docker_build_dir}/kubernetes-builder
+
+builder_container=$(docker run -id --rm --network=none --entrypoint=/bin/sh kubernetes-builder:%{IMAGE_TAG})
+mkdir -p %{binary_build_dir}
+docker cp ${builder_container}:%{built_binaries_dir}/kubelet %{binary_build_dir}/
+docker cp ${builder_container}:%{built_binaries_dir}/kubectl %{binary_build_dir}/
+docker cp ${builder_container}:%{built_binaries_dir}/kube-apiserver %{binary_build_dir}/
+docker cp ${builder_container}:%{built_binaries_dir}/kube-controller-manager %{binary_build_dir}/
+docker cp ${builder_container}:%{built_binaries_dir}/kube-proxy %{binary_build_dir}/
+docker cp ${builder_container}:%{built_binaries_dir}/kube-scheduler %{binary_build_dir}/
+mkdir -p %{binary_build_dir}/cni
+sync
+docker rm -f ${builder_container}
+docker rmi kubernetes-builder:%{IMAGE_TAG}
+
+# Build hyperkube container image
+rsync -av %{binary_build_dir}/kube-apiserver %{docker_build_dir}/hyperkube/
+rsync -av %{binary_build_dir}/kube-controller-manager %{docker_build_dir}/hyperkube/
+rsync -av %{binary_build_dir}/kube-proxy %{docker_build_dir}/hyperkube/
+rsync -av %{binary_build_dir}/kube-scheduler %{docker_build_dir}/hyperkube/
+docker build \
+  --network=host \
+  --no-cache \
+  --force-rm \
+  --build-arg HTTP_PROXY="${http_proxy}" \
+  --build-arg HTTPS_PROXY="${https_proxy}" \
+  --build-arg NO_PROXY="${no_proxy}" \
+  --build-arg http_proxy="${http_proxy}" \
+  --build-arg https_proxy="${https_proxy}" \
+  --build-arg no_proxy="${no_proxy}" \
+  --build-arg ceph_version="%{ceph_version}" \
+  --tag hyperkube:%{IMAGE_TAG} \
+  %{docker_build_dir}/hyperkube
+mkdir -p %{docker_save_dir}
+docker save hyperkube:%{IMAGE_TAG} | gzip -c > "%{docker_save_dir}/hyperkube:%{IMAGE_TAG}.tar"
+docker rmi hyperkube:%{IMAGE_TAG}
+
+# Build kubernetes pause container image
+docker build \
+  --network=host \
+  --no-cache \
+  --force-rm \
+  --build-arg HTTP_PROXY="${http_proxy}" \
+  --build-arg HTTPS_PROXY="${https_proxy}" \
+  --build-arg NO_PROXY="${no_proxy}" \
+  --build-arg http_proxy="${http_proxy}" \
+  --build-arg https_proxy="${https_proxy}" \
+  --build-arg no_proxy="${no_proxy}" \
+  --build-arg KUBERNETESPAUSE_VERSION="%{KUBERNETESPAUSE_VERSION}" \
+  --tag kubernetespause:%{IMAGE_TAG} \
+  %{docker_build_dir}/kubernetespause
+mkdir -p %{docker_save_dir}
+docker save kubernetespause:%{IMAGE_TAG} | gzip -c > "%{docker_save_dir}/kubernetespause:%{IMAGE_TAG}.tar"
+docker rmi kubernetespause:%{IMAGE_TAG}
+
+%install
+mkdir -p %{buildroot}/%{_caas_container_tar_path}
+rsync -av %{docker_save_dir}/* %{buildroot}/%{_caas_container_tar_path}/
+
+mkdir -p %{buildroot}/%{_roles_path}
+rsync -av ansible/roles/* %{buildroot}/%{_roles_path}/
+
+mkdir -p %{buildroot}/%{_playbooks_path}/
+rsync -av ansible/playbooks/* %{buildroot}/%{_playbooks_path}/
+
+mkdir -p %{buildroot}/usr/bin/
+install -D -m 0755 %{binary_build_dir}/kubectl %{buildroot}/usr/bin/kubectl
+install -D -m 0755 %{binary_build_dir}/kubelet %{buildroot}/usr/bin/kubelet
+
+mkdir -p %{buildroot}/%{_playbooks_path}/
+rsync -av ansible/playbooks/* %{buildroot}/%{_playbooks_path}/
+
+%files
+%{_caas_container_tar_path}/*.tar
+%{_roles_path}/
+%{_playbooks_path}/
+/usr/bin/kubectl
+/usr/bin/kubelet
+
+%preun
+
+%post
+mkdir -p %{_postconfig_path}
+ln -s %{_playbooks_path}/bootstrap_kube_proxy.yaml          %{_postconfig_path}/
+ln -s %{_playbooks_path}/bootstrap_kubelet.yaml             %{_postconfig_path}/
+ln -s %{_playbooks_path}/kube_master.yaml                   %{_postconfig_path}/
+ln -s %{_playbooks_path}/kube_secret_key_creation.yaml      %{_postconfig_path}/
+ln -s %{_playbooks_path}/kube_secret_key_distribution.yaml  %{_postconfig_path}/
+ln -s %{_playbooks_path}/kube_token_creation.yaml           %{_postconfig_path}/
+ln -s %{_playbooks_path}/kube_token_distribution.yaml       %{_postconfig_path}/
+ln -s %{_playbooks_path}/kubernetes_ceph.yaml               %{_postconfig_path}/
+ln -s %{_playbooks_path}/master_kube_proxy.yaml             %{_postconfig_path}/
+ln -s %{_playbooks_path}/master_kubelet.yaml                %{_postconfig_path}/
+ln -s %{_playbooks_path}/service_account_creation.yaml      %{_postconfig_path}/
+ln -s %{_playbooks_path}/service_account_distribution.yaml  %{_postconfig_path}/
+
+%postun
+if [ $1 -eq 0 ]; then
+  rm -f %{_postconfig_path}/bootstrap_kube_proxy.yaml
+  rm -f %{_postconfig_path}/bootstrap_kubelet.yaml
+  rm -f %{_postconfig_path}/kube_master.yaml
+  rm -f %{_postconfig_path}/kube_secret_key_creation.yaml
+  rm -f %{_postconfig_path}/kube_secret_key_distribution.yaml
+  rm -f %{_postconfig_path}/kube_token_creation.yaml
+  rm -f %{_postconfig_path}/kube_token_distribution.yaml
+  rm -f %{_postconfig_path}/kubernetes_ceph.yaml
+  rm -f %{_postconfig_path}/master_kube_proxy.yaml
+  rm -f %{_postconfig_path}/master_kubelet.yaml
+  rm -f %{_postconfig_path}/service_account_creation.yaml
+  rm -f %{_postconfig_path}/service_account_distribution.yaml
+fi
+
+%clean
+rm -rf ${buildroot}
diff --git a/docker-build/hyperkube/Dockerfile b/docker-build/hyperkube/Dockerfile
new file mode 100644 (file)
index 0000000..4f3fe5b
--- /dev/null
@@ -0,0 +1,42 @@
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM centos:7.6.1810
+MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
+
+ARG ceph_version
+
+# These packages explicitly needed to install specified ceph-common version
+ARG ceph_packages="ceph-common-$ceph_version librados2-$ceph_version libradosstriper1-$ceph_version"
+
+COPY kube-apiserver /kube-apiserver
+COPY kube-controller-manager /kube-controller-manager
+COPY kube-proxy /kube-proxy
+COPY kube-scheduler /kube-scheduler
+
+RUN useradd -u 144 -M -s /sbin/nologin kube \
+&&  yum install -y https://download.ceph.com/rpm-luminous/el7/noarch/ceph-release-1-1.el7.noarch.rpm \
+&&  yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
+&&  yum install -y --setopt=skip_missing_names_on_install=False \
+      ${ceph_packages} \
+\
+# Install kubernetes
+&&  chmod a+x /kube-apiserver \
+&&  chmod a+x /kube-controller-manager \
+&&  chmod a+x /kube-proxy \
+&&  chmod a+x /kube-scheduler \
+# Clean up
+&&  yum erase -y ceph-release \
+&&  yum autoremove -y \
+&&  yum clean all -y \
diff --git a/docker-build/hyperkube/bom.json b/docker-build/hyperkube/bom.json
new file mode 100644 (file)
index 0000000..7776a90
--- /dev/null
@@ -0,0 +1,1372 @@
+{
+  "bom": [
+    {
+      "name": "centos-linux-container",
+      "version": "7.6.1810",
+      "source-url": "https://github.com/CentOS/sig-cloud-instance-images/archive/7c2e214edced0b2f22e663ab4175a80fc93acaa9.tar.gz",
+      "foss": "yes"
+    },
+    {
+      "name": "acl.x86_64",
+      "version": "2.2.51-14.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/os/Source/SPackages/acl-2.2.51-14.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "audit-libs.x86_64",
+      "version": "2.8.4-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/audit-2.8.4-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "basesystem.noarch",
+      "version": "10.0-7.el7.centos",
+      "source-url": "http://purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/os/Source/SPackages/basesystem-10.0-7.el7.centos.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "bash.x86_64",
+      "version": "4.2.46-31.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/bash-4.2.46-31.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "binutils.x86_64",
+      "version": "2.27-34.base.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/binutils-2.27-34.base.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "bzip2.x86_64",
+      "version": "1.0.6-13.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/bzip2-1.0.6-13.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "bzip2-libs.x86_64",
+      "version": "1.0.6-13.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/bzip2-1.0.6-13.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "ca-certificates.noarch",
+      "version": "2018.2.22-70.0.el7_5",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/ca-certificates-2018.2.22-70.0.el7_5.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "centos-release.x86_64",
+      "version": "7-6.1810.2.el7.centos",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/centos-release-7-6.1810.2.el7.centos.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "ceph-common.x86_64",
+      "version": "2:12.2.5-0.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/ceph-12.2.5-0.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "chkconfig.x86_64",
+      "version": "1.7.4-1.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/chkconfig-1.7.4-1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "conntrack-tools.x86_64",
+      "version": "1.4.4-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/conntrack-tools-1.4.4-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "coreutils.x86_64",
+      "version": "8.22-23.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/coreutils-8.22-23.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "cpio.x86_64",
+      "version": "2.11-27.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/cpio-2.11-27.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "cracklib.x86_64",
+      "version": "2.9.0-11.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/cracklib-2.9.0-11.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "cracklib-dicts.x86_64",
+      "version": "2.9.0-11.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/cracklib-2.9.0-11.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "cryptsetup-libs.x86_64",
+      "version": "2.0.3-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/cryptsetup-2.0.3-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "curl.x86_64",
+      "version": "7.29.0-51.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/curl-7.29.0-51.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "cyrus-sasl-lib.x86_64",
+      "version": "2.1.26-23.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/cyrus-sasl-2.1.26-23.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "dbus.x86_64",
+      "version": "1:1.10.24-12.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/dbus-1.10.24-12.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "dbus-libs.x86_64",
+      "version": "1:1.10.24-12.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/dbus-1.10.24-12.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "device-mapper.x86_64",
+      "version": "7:1.02.149-8.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/lvm2-2.02.180-8.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "device-mapper-libs.x86_64",
+      "version": "7:1.02.149-8.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/lvm2-2.02.180-8.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "diffutils.x86_64",
+      "version": "3.3-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/diffutils-3.3-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "dracut.x86_64",
+      "version": "033-554.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/dracut-033-554.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "e2fsprogs.x86_64",
+      "version": "1.42.9-13.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/e2fsprogs-1.42.9-13.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "e2fsprogs-libs.x86_64",
+      "version": "1.42.9-13.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/e2fsprogs-1.42.9-13.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "elfutils-default-yama-scope.noarch",
+      "version": "0.172-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/elfutils-0.172-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "elfutils-libelf.x86_64",
+      "version": "0.172-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/elfutils-0.172-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "elfutils-libs.x86_64",
+      "version": "0.172-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/elfutils-0.172-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "expat.x86_64",
+      "version": "2.1.0-10.el7_3",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/expat-2.1.0-10.el7_3.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "file.x86_64",
+      "version": "5.11-35.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/file-5.11-35.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "file-libs.x86_64",
+      "version": "5.11-35.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/file-5.11-35.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "filesystem.x86_64",
+      "version": "3.2-25.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/filesystem-3.2-25.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "findutils.x86_64",
+      "version": "1:4.5.11-6.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/findutils-4.5.11-6.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "fuse-libs.x86_64",
+      "version": "2.9.2-11.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/fuse-2.9.2-11.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "gawk.x86_64",
+      "version": "4.0.2-4.el7_3.1",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/gawk-4.0.2-4.el7_3.1.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "gdbm.x86_64",
+      "version": "1.10-8.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/gdbm-1.10-8.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "glib2.x86_64",
+      "version": "2.56.1-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/glib2-2.56.1-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "glibc.x86_64",
+      "version": "2.17-260.el7_6.3",
+      "source-url": "vault.centos.org/7.6.1810/updates/Source/SPackages/glibc-2.17-260.el7_6.3.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "glibc-common.x86_64",
+      "version": "2.17-260.el7_6.3",
+      "source-url": "vault.centos.org/7.6.1810/updates/Source/SPackages/glibc-2.17-260.el7_6.3.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "gmp.x86_64",
+      "version": "1:6.0.0-15.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/gmp-6.0.0-15.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "gnupg2.x86_64",
+      "version": "2.0.22-5.el7_5",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/gnupg2-2.0.22-5.el7_5.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "gperftools-libs.x86_64",
+      "version": "2.6.1-1.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/gperftools-2.6.1-1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "gpgme.x86_64",
+      "version": "1.3.2-5.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/gpgme-1.3.2-5.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "grep.x86_64",
+      "version": "2.20-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/grep-2.20-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "groff-base.x86_64",
+      "version": "1.22.2-8.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/groff-1.22.2-8.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "gzip.x86_64",
+      "version": "1.5-10.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/gzip-1.5-10.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "hardlink.x86_64",
+      "version": "1:1.0-19.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/hardlink-1.0-19.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "hostname.x86_64",
+      "version": "3.13-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/hostname-3.13-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "hwdata.x86_64",
+      "version": "0.252-9.1.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/hwdata-0.252-9.1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "info.x86_64",
+      "version": "5.1-5.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/texinfo-5.1-5.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "initscripts.x86_64",
+      "version": "9.49.46-1.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/initscripts-9.49.46-1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "iproute.x86_64",
+      "version": "4.11.0-14.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/iproute-4.11.0-14.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "iptables.x86_64",
+      "version": "1.4.21-28.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/iptables-1.4.21-28.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "iputils.x86_64",
+      "version": "20160308-10.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/iputils-20160308-10.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "json-c.x86_64",
+      "version": "0.11-4.el7_0",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/json-c-0.11-4.el7_0.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "keyutils-libs.x86_64",
+      "version": "1.5.8-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/keyutils-1.5.8-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "kmod.x86_64",
+      "version": "20-23.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/kmod-20-23.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "kmod-libs.x86_64",
+      "version": "20-23.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/kmod-20-23.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "kpartx.x86_64",
+      "version": "0.4.9-123.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/device-mapper-multipath-0.4.9-123.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "krb5-libs.x86_64",
+      "version": "1.15.1-34.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/krb5-1.15.1-34.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "leveldb.x86_64",
+      "version": "1.12.0-11.el7",
+      "source-url": "download-ib01.fedoraproject.org/pub/epel/7/SRPMS/Packages/l/leveldb-1.12.0-11.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libacl.x86_64",
+      "version": "2.2.51-14.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/acl-2.2.51-14.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libaio.x86_64",
+      "version": "0.3.109-13.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libaio-0.3.109-13.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libassuan.x86_64",
+      "version": "2.1.0-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libassuan-2.1.0-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libattr.x86_64",
+      "version": "2.4.46-13.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/attr-2.4.46-13.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libbabeltrace.x86_64",
+      "version": "1.2.4-3.1.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/babeltrace-1.2.4-3.1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libblkid.x86_64",
+      "version": "2.23.2-59.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/util-linux-2.23.2-59.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libcap.x86_64",
+      "version": "2.22-9.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libcap-2.22-9.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libcap-ng.x86_64",
+      "version": "0.7.5-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libcap-ng-0.7.5-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libcephfs2.x86_64",
+      "version": "2:12.2.5-0.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/ceph-12.2.5-0.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libcom_err.x86_64",
+      "version": "1.42.9-13.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/e2fsprogs-1.42.9-13.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libcurl.x86_64",
+      "version": "7.29.0-51.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/curl-7.29.0-51.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libdb.x86_64",
+      "version": "5.3.21-24.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libdb-5.3.21-24.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libdb-utils.x86_64",
+      "version": "5.3.21-24.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libdb-5.3.21-24.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libffi.x86_64",
+      "version": "3.0.13-18.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libffi-3.0.13-18.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libgcc.x86_64",
+      "version": "4.8.5-36.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/gcc-4.8.5-36.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libgcrypt.x86_64",
+      "version": "1.5.3-14.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libgcrypt-1.5.3-14.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libgpg-error.x86_64",
+      "version": "1.12-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libgpg-error-1.12-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libibverbs.x86_64",
+      "version": "17.2-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/rdma-core-17.2-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libidn.x86_64",
+      "version": "1.28-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libidn-1.28-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libmnl.x86_64",
+      "version": "1.0.3-7.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libmnl-1.0.3-7.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libmount.x86_64",
+      "version": "2.23.2-59.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/util-linux-2.23.2-59.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libnetfilter_conntrack.x86_64",
+      "version": "1.0.6-1.el7_3",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libnetfilter_conntrack-1.0.6-1.el7_3.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libnetfilter_cthelper.x86_64",
+      "version": "1.0.0-9.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libnetfilter_cthelper-1.0.0-9.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libnetfilter_cttimeout.x86_64",
+      "version": "1.0.0-6.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libnetfilter_cttimeout-1.0.0-6.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libnetfilter_queue.x86_64",
+      "version": "1.0.2-2.el7_2",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libnetfilter_queue-1.0.2-2.el7_2.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libnfnetlink.x86_64",
+      "version": "1.0.1-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libnfnetlink-1.0.1-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libnl3.x86_64",
+      "version": "3.2.28-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libnl3-3.2.28-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libpwquality.x86_64",
+      "version": "1.2.3-5.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libpwquality-1.2.3-5.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "librados2.x86_64",
+      "version": "2:12.2.5-0.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/ceph-12.2.5-0.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libradosstriper1.x86_64",
+      "version": "2:12.2.5-0.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/ceph-12.2.5-0.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "librbd1.x86_64",
+      "version": "2:12.2.5-0.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/ceph-12.2.5-0.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "librgw2.x86_64",
+      "version": "2:12.2.5-0.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/ceph-12.2.5-0.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libselinux.x86_64",
+      "version": "2.5-14.1.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libselinux-2.5-14.1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libsemanage.x86_64",
+      "version": "2.5-14.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libsemanage-2.5-14.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libsepol.x86_64",
+      "version": "2.5-10.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libsepol-2.5-10.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libsmartcols.x86_64",
+      "version": "2.23.2-59.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/util-linux-2.23.2-59.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libss.x86_64",
+      "version": "1.42.9-13.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/e2fsprogs-1.42.9-13.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libssh2.x86_64",
+      "version": "1.4.3-12.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libssh2-1.4.3-12.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libstdc++.x86_64",
+      "version": "4.8.5-36.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/gcc-4.8.5-36.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libtasn1.x86_64",
+      "version": "4.10-1.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libtasn1-4.10-1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libuser.x86_64",
+      "version": "0.60-9.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libuser-0.60-9.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libutempter.x86_64",
+      "version": "1.1.6-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libutempter-1.1.6-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libuuid.x86_64",
+      "version": "2.23.2-59.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/util-linux-2.23.2-59.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libverto.x86_64",
+      "version": "0.2.5-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libverto-0.2.5-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libxml2.x86_64",
+      "version": "2.9.1-6.el7_2.3",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libxml2-2.9.1-6.el7_2.3.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "libxml2-python.x86_64",
+      "version": "2.9.1-6.el7_2.3",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/libxml2-2.9.1-6.el7_2.3.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "lttng-ust.x86_64",
+      "version": "2.10.0-1.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/lttng-ust-2.10.0-1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "lua.x86_64",
+      "version": "5.1.4-15.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/lua-5.1.4-15.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "lz4.x86_64",
+      "version": "1.7.5-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/lz4-1.7.5-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "ncurses.x86_64",
+      "version": "5.9-14.20130511.el7_4",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/ncurses-5.9-14.20130511.el7_4.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "ncurses-base.noarch",
+      "version": "5.9-14.20130511.el7_4",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/ncurses-5.9-14.20130511.el7_4.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "ncurses-libs.x86_64",
+      "version": "5.9-14.20130511.el7_4",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/ncurses-5.9-14.20130511.el7_4.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "nspr.x86_64",
+      "version": "4.19.0-1.el7_5",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/nspr-4.19.0-1.el7_5.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "nss.x86_64",
+      "version": "3.36.0-7.el7_5",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/nss-3.36.0-7.el7_5.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "nss-pem.x86_64",
+      "version": "1.0.3-5.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/nss-pem-1.0.3-5.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "nss-softokn.x86_64",
+      "version": "3.36.0-5.el7_5",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/nss-softokn-3.36.0-5.el7_5.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "nss-softokn-freebl.x86_64",
+      "version": "3.36.0-5.el7_5",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/nss-softokn-3.36.0-5.el7_5.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "nss-sysinit.x86_64",
+      "version": "3.36.0-7.el7_5",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/nss-softokn-3.36.0-5.el7_5.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "nss-tools.x86_64",
+      "version": "3.36.0-7.el7_5",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/nss-softokn-3.36.0-5.el7_5.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "nss-util.x86_64",
+      "version": "3.36.0-1.el7_5",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/nss-softokn-3.36.0-5.el7_5.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "openldap.x86_64",
+      "version": "2.4.44-20.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/openldap-2.4.44-20.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "openssl-libs.x86_64",
+      "version": "1:1.0.2k-16.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/openssl-1.0.2k-16.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "p11-kit.x86_64",
+      "version": "0.23.5-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/p11-kit-0.23.5-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "p11-kit-trust.x86_64",
+      "version": "0.23.5-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/p11-kit-0.23.5-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "pam.x86_64",
+      "version": "1.1.8-22.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/pam-1.1.8-22.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "passwd.x86_64",
+      "version": "0.79-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/passwd-0.79-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "pciutils.x86_64",
+      "version": "3.5.1-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/pciutils-3.5.1-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "pciutils-libs.x86_64",
+      "version": "3.5.1-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/pciutils-3.5.1-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "pcre.x86_64",
+      "version": "8.32-17.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/pcre-8.32-17.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl.x86_64",
+      "version": "4:5.16.3-294.el7_6",
+      "source-url": "vault.centos.org/7.6.1810/updates/Source/SPackages/perl-5.16.3-294.el7_6.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Carp.noarch",
+      "version": "1.26-244.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Carp-1.26-244.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Encode.x86_64",
+      "version": "2.51-7.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Encode-2.51-7.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Exporter.noarch",
+      "version": "5.68-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Exporter-5.68-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-File-Path.noarch",
+      "version": "2.09-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-File-Path-2.09-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-File-Temp.noarch",
+      "version": "0.23.01-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-File-Temp-0.23.01-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Filter.x86_64",
+      "version": "1.49-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Filter-1.49-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Getopt-Long.noarch",
+      "version": "2.40-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Getopt-Long-2.40-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-HTTP-Tiny.noarch",
+      "version": "0.033-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-HTTP-Tiny-0.033-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-PathTools.x86_64",
+      "version": "3.40-5.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-PathTools-3.40-5.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Pod-Escapes.noarch",
+      "version": "1:1.04-294.el7_6",
+      "source-url": "vault.centos.org/7.6.1810/updates/Source/SPackages/perl-5.16.3-294.el7_6.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Pod-Perldoc.noarch",
+      "version": "3.20-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Pod-Perldoc-3.20-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Pod-Simple.noarch",
+      "version": "1:3.28-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Pod-Simple-3.28-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Pod-Usage.noarch",
+      "version": "1.63-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Pod-Usage-1.63-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Scalar-List-Utils.x86_64",
+      "version": "1.27-248.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Scalar-List-Utils-1.27-248.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Socket.x86_64",
+      "version": "2.010-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Socket-2.010-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Storable.x86_64",
+      "version": "2.45-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Storable-2.45-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Text-ParseWords.noarch",
+      "version": "3.29-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Text-ParseWords-3.29-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Time-HiRes.x86_64",
+      "version": "4:1.9725-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Time-HiRes-1.9725-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-Time-Local.noarch",
+      "version": "1.2300-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-Time-Local-1.2300-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-constant.noarch",
+      "version": "1.27-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-constant-1.27-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-libs.x86_64",
+      "version": "4:5.16.3-294.el7_6",
+      "source-url": "vault.centos.org/7.6.1810/updates/Source/SPackages/perl-5.16.3-294.el7_6.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-macros.x86_64",
+      "version": "4:5.16.3-294.el7_6",
+      "source-url": "vault.centos.org/7.6.1810/updates/Source/SPackages/perl-5.16.3-294.el7_6.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-parent.noarch",
+      "version": "1:0.225-244.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-parent-0.225-244.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-podlators.noarch",
+      "version": "2.5.1-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-podlators-2.5.1-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-threads.x86_64",
+      "version": "1.87-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-threads-1.87-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "perl-threads-shared.x86_64",
+      "version": "1.43-6.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/perl-threads-shared-1.43-6.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "pinentry.x86_64",
+      "version": "0.8.1-17.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/pinentry-0.8.1-17.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "pkgconfig.x86_64",
+      "version": "1:0.27.1-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/pkgconfig-0.27.1-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "popt.x86_64",
+      "version": "1.13-16.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/popt-1.13-16.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "procps-ng.x86_64",
+      "version": "3.3.10-23.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/procps-ng-3.3.10-23.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "pth.x86_64",
+      "version": "2.0.7-23.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/pth-2.0.7-23.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "pygpgme.x86_64",
+      "version": "0.3-9.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/pygpgme-0.3-9.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "pyliblzma.x86_64",
+      "version": "0.5.3-11.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/pyliblzma-0.5.3-11.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python.x86_64",
+      "version": "2.7.5-76.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-2.7.5-76.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-backports.x86_64",
+      "version": "1.0-8.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-backports-1.0-8.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-backports-ssl_match_hostname.noarch",
+      "version": "3.5.0.1-1.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-backports-ssl_match_hostname-3.5.0.1-1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-cephfs.x86_64",
+      "version": "2:12.2.5-0.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/ceph-12.2.5-0.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-chardet.noarch",
+      "version": "2.2.1-1.el7_1",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-chardet-2.2.1-1.el7_1.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-iniparse.noarch",
+      "version": "0.4-9.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-iniparse-0.4-9.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-ipaddress.noarch",
+      "version": "1.0.16-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-ipaddress-1.0.16-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-kitchen.noarch",
+      "version": "1.1.1-5.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-kitchen-1.1.1-5.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-libs.x86_64",
+      "version": "2.7.5-76.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-2.7.5-76.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-meld3.x86_64",
+      "version": "0.6.10-1.el7",
+      "source-url": "download-ib01.fedoraproject.org/pub/epel/7/SRPMS/Packages/p/python-meld3-0.6.10-1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-prettytable.noarch",
+      "version": "0.7.2-3.el7",
+      "source-url": "forensics.cert.org/centos/cert/7/SRPMS/python-prettytable-0.7.2-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-pycurl.x86_64",
+      "version": "7.19.0-19.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-pycurl-7.19.0-19.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-rados.x86_64",
+      "version": "2:12.2.5-0.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/ceph-12.2.5-0.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-rbd.x86_64",
+      "version": "2:12.2.5-0.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/ceph-12.2.5-0.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-requests.noarch",
+      "version": "2.6.0-1.el7_1",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-requests-2.6.0-1.el7_1.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-rgw.x86_64",
+      "version": "2:12.2.5-0.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/ceph-12.2.5-0.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-setuptools.noarch",
+      "version": "0.9.8-7.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-setuptools-0.9.8-7.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-six.noarch",
+      "version": "1.9.0-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-six-1.9.0-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-urlgrabber.noarch",
+      "version": "3.10-9.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-urlgrabber-3.10-9.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "python-urllib3.noarch",
+      "version": "1.10.2-5.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/python-urllib3-1.10.2-5.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "pyxattr.x86_64",
+      "version": "0.5.1-5.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/pyxattr-0.5.1-5.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "qrencode-libs.x86_64",
+      "version": "3.4.1-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/qrencode-3.4.1-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "rdma-core.x86_64",
+      "version": "17.2-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/rdma-core-17.2-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "readline.x86_64",
+      "version": "6.2-10.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/readline-6.2-10.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "rootfiles.noarch",
+      "version": "8.1-11.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/rootfiles-8.1-11.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "rpm.x86_64",
+      "version": "4.11.3-35.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/rpm-4.11.3-35.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "rpm-build-libs.x86_64",
+      "version": "4.11.3-35.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/rpm-4.11.3-35.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "rpm-libs.x86_64",
+      "version": "4.11.3-35.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/rpm-4.11.3-35.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "rpm-python.x86_64",
+      "version": "4.11.3-35.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/rpm-4.11.3-35.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "rsync.x86_64",
+      "version": "3.1.2-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/rsync-3.1.2-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "sed.x86_64",
+      "version": "4.2.2-5.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/sed-4.2.2-5.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "setup.noarch",
+      "version": "2.8.71-10.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/setup-2.8.71-10.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "shadow-utils.x86_64",
+      "version": "2:4.1.5.1-25.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/shadow-utils-4.1.5.1-25.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "shared-mime-info.x86_64",
+      "version": "1.8-4.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/shared-mime-info-1.8-4.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "snappy.x86_64",
+      "version": "1.1.0-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/snappy-1.1.0-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "socat.x86_64",
+      "version": "1.7.3.2-2.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/socat-1.7.3.2-2.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "sqlite.x86_64",
+      "version": "3.7.17-8.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/sqlite-3.7.17-8.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "supervisor.noarch",
+      "version": "3.1.4-1.el7",
+      "source-url": "download-ib01.fedoraproject.org/pub/epel/7/SRPMS/Packages/s/supervisor-3.1.4-1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "systemd.x86_64",
+      "version": "219-62.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/systemd-219-62.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "systemd-libs.x86_64",
+      "version": "219-62.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/systemd-219-62.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "sysvinit-tools.x86_64",
+      "version": "2.88-14.dsf.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/sysvinit-2.88-14.dsf.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "tar.x86_64",
+      "version": "2:1.26-35.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/tar-1.26-35.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "tcp_wrappers-libs.x86_64",
+      "version": "7.6-77.el7",
+      "source-url": "http://vault.centos.org/7.6.1810/os/Source/SPackages/tcp_wrappers-7.6-77.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "tzdata.noarch",
+      "version": "2018e-3.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/tzdata-2018e-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "userspace-rcu.x86_64",
+      "version": "0.10.0-3.el7",
+      "source-url": "purkki.dynamic.nsn-net.net/mirrors/centos/snapshot/20181003/7/storage/Source/ceph-luminous/userspace-rcu-0.10.0-3.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "ustr.x86_64",
+      "version": "1.0.4-16.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/ustr-1.0.4-16.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "util-linux.x86_64",
+      "version": "2.23.2-59.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/util-linux-2.23.2-59.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "vim-minimal.x86_64",
+      "version": "2:7.4.160-5.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/vim-7.4.160-5.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "xz.x86_64",
+      "version": "5.2.2-1.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/xz-5.2.2-1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "xz-libs.x86_64",
+      "version": "5.2.2-1.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/xz-5.2.2-1.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "yum.noarch",
+      "version": "3.4.3-161.el7.centos",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/yum-3.4.3-161.el7.centos.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "yum-metadata-parser.x86_64",
+      "version": "1.1.4-10.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/yum-metadata-parser-1.1.4-10.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "yum-plugin-fastestmirror.noarch",
+      "version": "1.1.31-50.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/yum-utils-1.1.31-50.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "yum-plugin-ovl.noarch",
+      "version": "1.1.31-50.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/yum-utils-1.1.31-50.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "yum-utils.noarch",
+      "version": "1.1.31-50.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/yum-utils-1.1.31-50.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "zlib.x86_64",
+      "version": "1.2.7-18.el7",
+      "source-url": "vault.centos.org/7.6.1810/os/Source/SPackages/zlib-1.2.7-18.el7.src.rpm",
+      "foss": "yes"
+    },
+    {
+      "name": "kubernetes",
+      "version": "1.13.3",
+      "source-url": "https://github.com/kubernetes/kubernetes/archive/v1.13.3.tar.gz",
+      "foss": "yes"
+    },
+    {
+      "name": "cni",
+      "version": "0.7.0",
+      "source-url": "https://github.com/containernetworking/plugins/archive/v0.7.0.tar.gz",
+      "foss": "yes"
+    },
+    {
+      "name": "sriov-cni",
+      "version": "0.2",
+      "source-url": "https://github.com/intel/sriov-cni/archive/v0.2.tar.gz",
+      "foss": "yes"
+    },
+    {
+      "name": "danm",
+      "version": "3.0.0",
+      "source-url": "https://github.com/nokia/danm/archive/v3.0.0.tar.gz",
+      "foss": "yes"
+    },
+    {
+      "name": "go",
+      "version": "1.10.3",
+      "source-url": "https://github.com/golang/go/archive/go1.10.3.tar.gz",
+      "foss": "yes"
+    }
+  ]
+}
diff --git a/docker-build/hyperkube/common_scripts/wait-for-files b/docker-build/hyperkube/common_scripts/wait-for-files
new file mode 100755 (executable)
index 0000000..7d59ec3
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+file_names=$1
+retry_counter=${2:-12}
+echo ${retry_counter}
+I=0
+Err_Flag=1
+
+while  [ $Err_Flag -ne 0 ] && [ $I -lt ${retry_counter} ]
+do
+  Err_Flag=0
+  for i in ${file_names};
+  do
+    if [ ! -e "${i}" ]
+    then
+      Err_Flag=$((Err_Flag+1))
+    fi
+  done
+  if [ $Err_Flag -ne 0 ]
+  then
+    I=$((I+1))
+    sleep 5
+  fi
+done
+
+if [ $I -ge ${retry_counter} ]
+then
+  echo "WARNING: At least one of the following file not found: ${file_names} !"
+  echo "WARNING: Exiting!"
+  exit 1
+else
+  echo "INFO: ${file_names} files found."
+fi
diff --git a/docker-build/kubernetes-builder/Dockerfile b/docker-build/kubernetes-builder/Dockerfile
new file mode 100644 (file)
index 0000000..e96f12e
--- /dev/null
@@ -0,0 +1,58 @@
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM centos:7.6.1810
+MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
+
+ARG KUBERNETES_VERSION
+ARG go_version
+ARG go_install_dir="/usr/local/go"
+ENV GOPATH="/build"
+ARG binaries
+ARG build_packages="gcc gcc-c++ glibc-devel make autoconf git which libtool"
+ENV GOROOT_BOOTSTRAP="$go_install_dir"
+ENV GOOS=linux
+ENV PATH="$GOPATH/bin:$go_install_dir/bin:$PATH"
+
+RUN set -x \
+&& env \
+&&  yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
+&&  yum install -y --setopt=skip_missing_names_on_install=False \
+      ${build_packages} \
+      bash \
+      golang \
+      curl \
+      binutils \
+      file \
+      rsync \
+      tar \
+      coreutils \
+      grep \
+      util-linux \
+&&  mkdir -p ${go_install_dir} \
+&&  curl -fsSL -k https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz | tar zx --strip-components=1 -C ${go_install_dir} \
+#
+# Build Kubernetes
+#
+&&  mkdir -p ${GOPATH}/src/github.com/kubernetes/kubernetes \
+&&  curl -fsSL https://github.com/kubernetes/kubernetes/archive/v${KUBERNETES_VERSION}.tar.gz | tar zx --strip-components=1 -C ${GOPATH}/src/github.com/kubernetes/kubernetes \
+&&  cd ${GOPATH}/src/github.com/kubernetes/kubernetes \
+&&  make WHAT="cmd/kubelet" \
+&&  make WHAT="cmd/kubectl" \
+&&  make WHAT="cmd/kube-apiserver" \
+&&  make WHAT="cmd/kube-controller-manager" \
+&&  make WHAT="cmd/kube-proxy" \
+&&  make WHAT="cmd/kube-scheduler" \
+&&  mkdir -p ${binaries} \
+&&  mv ./_output/local/bin/linux/amd64/{kubelet,kubectl,kube-apiserver,kube-controller-manager,kube-proxy,kube-scheduler} ${binaries}/ \
diff --git a/docker-build/kubernetespause/Dockerfile b/docker-build/kubernetespause/Dockerfile
new file mode 100644 (file)
index 0000000..ef18cf4
--- /dev/null
@@ -0,0 +1,16 @@
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+ARG KUBERNETESPAUSE_VERSION=3.1
+FROM gcr.io/google-containers/pause-amd64:${KUBERNETESPAUSE_VERSION}
diff --git a/docker-build/kubernetespause/bom.json b/docker-build/kubernetespause/bom.json
new file mode 100644 (file)
index 0000000..7b9add1
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "bom": [
+    {
+      "name": "scratch-docker-image",
+      "version": "master",
+      "source-url": "https://github.com/docker-library/official-images/archive/master.zip",
+      "foss": "yes"
+    },
+    {
+      "name": "kubernetes",
+      "version": "1.13.3",
+      "source-url": "https://github.com/kubernetes/kubernetes/archive/v1.13.3.tar.gz",
+      "foss": "yes"
+    }
+  ]
+}