From 990fab74acfc2d93a81660e8a04c701b6e2c1437 Mon Sep 17 00:00:00 2001 From: Luuk van Venrooij Date: Wed, 25 Mar 2020 15:58:22 +0100 Subject: [PATCH 1/5] Back merge of fixes from 0.6.0 to 0.4.4 --- CHANGELOG-0.4.md | 9 + CHANGELOG.md | 1 + .../infrastructure/virtual-machine.yml | 53 ++++++ .../infrastructure/virtual-machine.yml | 77 +++++++- .../infrastructure/virtual-machine.j2 | 1 + .../files/server/Debian/create-repository.sh | 17 +- .../data/common/defaults/epiphany-cluster.yml | 169 +++++++++--------- docs/home/howto/CLUSTER.md | 77 +++++++- 8 files changed, 317 insertions(+), 87 deletions(-) diff --git a/CHANGELOG-0.4.md b/CHANGELOG-0.4.md index 074f765f95..a14ffe632d 100644 --- a/CHANGELOG-0.4.md +++ b/CHANGELOG-0.4.md @@ -1,5 +1,14 @@ # Changelog 0.4 +## [0.4.4] 2020-04-xx + +### Fixed + +- [#966](https://github.com/epiphany-platform/epiphany/issues/966) - Ubuntu builds get stuck on 'Create epirepo repository' task waiting for user input in offline mode +- [#1043](https://github.com/epiphany-platform/epiphany/issues/1043) - For vm template on Azure disk_size_gb is missing in storage_os_disk +- [#1049](https://github.com/epiphany-platform/epiphany/issues/1049) - Azure/RedHat specified disk size 30 GB is smaller than the size of the disk in the VM image +- [#1063](https://github.com/epiphany-platform/epiphany/issues/1063) - Issues with single_machine install + ## [0.4.3] 2020-03-16 ### Fixed diff --git a/CHANGELOG.md b/CHANGELOG.md index d8221c0f8a..e2d50d1565 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Reference for actual cluster component versions can be found [here](docs/home/CO ### 0.4.x +- [CHANGELOG-0.4.4](./CHANGELOG-0.4.md#044-2020-04-xx) - [CHANGELOG-0.4.3](./CHANGELOG-0.4.md#043-2020-03-16) - [CHANGELOG-0.4.2](./CHANGELOG-0.4.md#042-2019-11-20) - [CHANGELOG-0.4.1](./CHANGELOG-0.4.md#041-2019-10-17) diff --git a/core/src/epicli/data/aws/defaults/infrastructure/virtual-machine.yml b/core/src/epicli/data/aws/defaults/infrastructure/virtual-machine.yml index e135692cfa..442ba4686e 100644 --- a/core/src/epicli/data/aws/defaults/infrastructure/virtual-machine.yml +++ b/core/src/epicli/data/aws/defaults/infrastructure/virtual-machine.yml @@ -739,3 +739,56 @@ specification: destination_port_range: "0" source_address_prefix: "0.0.0.0/0" destination_address_prefix: "0.0.0.0/0" +--- +kind: infrastructure/virtual-machine +title: "Virtual Machine Infra" +provider: aws +name: single-machine +specification: + size: t3.xlarge + authorized_to_efs: true + mount_efs: true + security: + rules: + - name: ssh + description: Allow ssh traffic + priority: 101 + direction: Inbound + access: Allow + protocol: Tcp + source_port_range: "*" + destination_port_range: "22" + source_address_prefix: "0.0.0.0/0" + destination_address_prefix: "0.0.0.0/0" + - name: repository + description: Allow repository traffic + priority: 302 + direction: Inbound + access: Allow + protocol: Tcp + source_port_range: "*" + destination_port_range: "80" + source_address_prefix: "10.1.0.0/20" + destination_address_prefix: "0.0.0.0/0" + - name: subnet-traffic + description: Allow subnet traffic + priority: 102 + direction: Inbound + access: Allow + protocol: ALL + source_port_range: "*" + destination_from_port: 0 + destination_to_port: 65536 + destination_port_range: "0" + source_address_prefix: "10.1.1.0/24" + destination_address_prefix: "0.0.0.0/0" + - name: out + description: Allow out + priority: 101 + direction: Egress + access: Allow + protocol: "all" + source_port_range: "*" + destination_port_range: "0" + source_address_prefix: "0.0.0.0/0" + destination_address_prefix: "0.0.0.0/0" \ No newline at end of file diff --git a/core/src/epicli/data/azure/defaults/infrastructure/virtual-machine.yml b/core/src/epicli/data/azure/defaults/infrastructure/virtual-machine.yml index 3c5ff350fa..934ad6725d 100644 --- a/core/src/epicli/data/azure/defaults/infrastructure/virtual-machine.yml +++ b/core/src/epicli/data/azure/defaults/infrastructure/virtual-machine.yml @@ -21,7 +21,7 @@ specification: managed: false caching: ReadWrite create_option: FromImage - disk_size_gb: 30 + disk_size_gb: 32 managed_disk_type: Premium_LRS network_interface: enable_accelerated_networking: false @@ -657,4 +657,77 @@ specification: source_port_range: "*" destination_port_range: "9101" source_address_prefix: "10.1.0.0/20" - destination_address_prefix: "0.0.0.0/0" \ No newline at end of file + destination_address_prefix: "0.0.0.0/0" +--- +kind: infrastructure/virtual-machine +title: "Virtual Machine Infra" +provider: azure +name: single-machine +specification: + size: Standard_DS3_v2 + security: + rules: + - name: ssh + description: Allow SSH + priority: 100 + direction: Inbound + access: Allow + protocol: Tcp + source_port_range: "*" + destination_port_range: "22" + source_address_prefix: "0.0.0.0/0" + destination_address_prefix: "0.0.0.0/0" + - name: out + description: Allow out + priority: 101 + direction: Outbound + access: Allow + protocol: "*" + source_port_range: "*" + destination_port_range: "0" + source_address_prefix: "0.0.0.0/0" + destination_address_prefix: "0.0.0.0/0" + - name: subnet-traffic + description: Allow subnet traffic + priority: 201 + direction: Inbound + access: Allow + protocol: "*" + source_port_range: "*" + destination_from_port: 0 + destination_to_port: 65536 + destination_port_range: "0" + source_address_prefix: "10.1.1.0/24" + destination_address_prefix: "0.0.0.0/0" + - name: package_repository + description: Allow package repository traffic + priority: 205 + direction: Inbound + access: Allow + protocol: Tcp + source_port_range: "*" + destination_port_range: "80" + source_address_prefix: "10.1.0.0/20" + destination_address_prefix: "0.0.0.0/0" + - name: image_repository + description: Allow image repository traffic + priority: 206 + direction: Inbound + access: Allow + protocol: Tcp + source_port_range: "*" + destination_port_range: "5000" + source_address_prefix: "10.1.0.0/20" + destination_address_prefix: "0.0.0.0/0" + # - name: node2-subnet-traffic + # description: Allow node subnet traffic + # priority: 102 + # direction: Inbound + # access: Allow + # protocol: "*" + # source_port_range: "*" + # destination_from_port: 0 + # destination_to_port: 65536 + # destination_port_range: "0" + # source_address_prefix: "10.1.4.0/24" + # destination_address_prefix: "0.0.0.0/0" \ No newline at end of file diff --git a/core/src/epicli/data/azure/terraform/infrastructure/virtual-machine.j2 b/core/src/epicli/data/azure/terraform/infrastructure/virtual-machine.j2 index 6bb7fe943c..3c3de1d4f8 100644 --- a/core/src/epicli/data/azure/terraform/infrastructure/virtual-machine.j2 +++ b/core/src/epicli/data/azure/terraform/infrastructure/virtual-machine.j2 @@ -51,6 +51,7 @@ resource "azurerm_virtual_machine" "{{ specification.name }}" { name = "{{ specification.name }}-os-disk" caching = "{{ specification.storage_os_disk.caching }}" create_option = "{{ specification.storage_os_disk.create_option }}" + disk_size_gb = "{{ specification.storage_os_disk.disk_size_gb }}" {%- if specification.storage_os_disk.managed != true %} managed_disk_type = "{{ specification.storage_os_disk.managed_disk_type | lower }}" {%- else %} diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/server/Debian/create-repository.sh b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/server/Debian/create-repository.sh index 98b88b8fa0..1b3b249502 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/server/Debian/create-repository.sh +++ b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/server/Debian/create-repository.sh @@ -18,16 +18,25 @@ if $IS_OFFLINE_MODE = true; then cd "${EPI_REPO_SERVER_PATH}"/packages && /tmp/epi-repository-setup-scripts/dpkg-scanpackages -m . | gzip -9c > Packages.gz && cd "${script_path}" echo "deb [trusted=yes] file:${EPI_REPO_SERVER_PATH}/packages ./" > /etc/apt/sources.list.d/epilocal.list #apt update --assume-no # workaround for botched docker repository https://github.com/docker/for-linux/issues/812 - echo "updating apt and installing apache..." + echo "updating list of available packages..." apt -y update - apt -y install apache2 dpkg-dev + echo "installing apache..." + # force non-interactive mode, ref: https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1833013 + DEBIAN_FRONTEND=noninteractive \ + UCF_FORCE_CONFOLD=1 \ + apt-get \ + -o Dpkg::Options::=--force-confold \ + -o Dpkg::Options::=--force-confdef \ + -y -q install apache2 dpkg-dev echo "removing temporary repo definition: /etc/apt/sources.list.d/epilocal.list..." rm -f /etc/apt/sources.list.d/epilocal.list #rm -f ${EPI_REPO_SERVER_PATH}/packages/Packages.gz - echo "updating apt..." + echo "updating list of available packages..." apt -y update else - # for online mode just install apache (force non-interactive mode, ref: https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1833013) + # for online mode just install apache + echo "installing apache..." + # force non-interactive mode, ref: https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1833013 DEBIAN_FRONTEND=noninteractive \ UCF_FORCE_CONFOLD=1 \ apt-get \ diff --git a/core/src/epicli/data/common/defaults/epiphany-cluster.yml b/core/src/epicli/data/common/defaults/epiphany-cluster.yml index 27e742101f..f7eeb79357 100644 --- a/core/src/epicli/data/common/defaults/epiphany-cluster.yml +++ b/core/src/epicli/data/common/defaults/epiphany-cluster.yml @@ -1,80 +1,89 @@ -kind: epiphany-cluster -title: "Epiphany cluster Config" -provider: aws -name: "default" -specification: - prefix: default - name: epiphanycluster - admin_user: - name: operations # YOUR-ADMIN-USERNAME - key_path: /root/.ssh/epiphany-operations/id_rsa # YOUR-SSH-KEY-PATH - cloud: - subscription_name: YOUR-SUB-NAME - vnet_address_pool: 10.1.0.0/20 - use_public_ips: False # When not using public IPs you have to provide connectivity via private IPs (VPN) - use_service_principal: False - region: eu-west-2 - credentials: # todo change it to get credentials from vault - key: 3124-4124-4124 - secret: DADFAFHCJHCAUYEAk - components: - kubernetes_master: - count: 1 - machine: kubernetes-master-machine - configuration: default - subnets: - - availability_zone: eu-west-2a - address_pool: 10.1.1.0/24 - - availability_zone: eu-west-2b - address_pool: 10.1.2.0/24 - kubernetes_node: - count: 2 - machine: kubernetes-node-machine - configuration: default - subnets: - - availability_zone: eu-west-2a - address_pool: 10.1.1.0/24 - - availability_zone: eu-west-2b - address_pool: 10.1.2.0/24 - logging: - count: 1 - machine: logging-machine - configuration: default - subnets: - - availability_zone: eu-west-2a - address_pool: 10.1.3.0/24 - monitoring: - count: 1 - machine: monitoring-machine - configuration: default - subnets: - - availability_zone: eu-west-2a - address_pool: 10.1.4.0/24 - kafka: - count: 2 - machine: kafka-machine - configuration: default - subnets: - - availability_zone: eu-west-2a - address_pool: 10.1.5.0/24 - postgresql: - count: 0 - machine: postgresql-machine - configuration: default - subnets: - - availability_zone: eu-west-2a - address_pool: 10.1.6.0/24 - load_balancer: - count: 1 - machine: load-balancer-machine - configuration: default - subnets: - - availability_zone: eu-west-2a - address_pool: 10.1.7.0/24 - rabbitmq: - count: 0 - machine: rabbitmq-machine - configuration: default - subnets: - - availability_zone: eu-west-2a - address_pool: 10.1.8.0/24 +kind: epiphany-cluster +title: "Epiphany cluster Config" +provider: aws +name: "default" +specification: + prefix: default + name: epiphanycluster + admin_user: + name: operations # YOUR-ADMIN-USERNAME + key_path: /root/.ssh/epiphany-operations/id_rsa # YOUR-SSH-KEY-PATH + cloud: + subscription_name: YOUR-SUB-NAME + vnet_address_pool: 10.1.0.0/20 + use_public_ips: False # When not using public IPs you have to provide connectivity via private IPs (VPN) + use_service_principal: False + region: eu-west-2 + credentials: # todo change it to get credentials from vault + key: 3124-4124-4124 + secret: DADFAFHCJHCAUYEAk + components: + kubernetes_master: + count: 1 + machine: kubernetes-master-machine + configuration: default + subnets: + - availability_zone: eu-west-2a + address_pool: 10.1.1.0/24 + - availability_zone: eu-west-2b + address_pool: 10.1.2.0/24 + kubernetes_node: + count: 2 + machine: kubernetes-node-machine + configuration: default + subnets: + - availability_zone: eu-west-2a + address_pool: 10.1.1.0/24 + - availability_zone: eu-west-2b + address_pool: 10.1.2.0/24 + logging: + count: 1 + machine: logging-machine + configuration: default + subnets: + - availability_zone: eu-west-2a + address_pool: 10.1.3.0/24 + monitoring: + count: 1 + machine: monitoring-machine + configuration: default + subnets: + - availability_zone: eu-west-2a + address_pool: 10.1.4.0/24 + kafka: + count: 2 + machine: kafka-machine + configuration: default + subnets: + - availability_zone: eu-west-2a + address_pool: 10.1.5.0/24 + postgresql: + count: 0 + machine: postgresql-machine + configuration: default + subnets: + - availability_zone: eu-west-2a + address_pool: 10.1.6.0/24 + load_balancer: + count: 1 + machine: load-balancer-machine + configuration: default + subnets: + - availability_zone: eu-west-2a + address_pool: 10.1.7.0/24 + rabbitmq: + count: 0 + machine: rabbitmq-machine + configuration: default + subnets: + - availability_zone: eu-west-2a + address_pool: 10.1.8.0/24 + single_machine: + count: 0 + machine: single-machine + configuration: default + subnets: + - availability_zone: eu-west-2a + address_pool: 10.1.1.0/24 + - availability_zone: eu-west-2b + address_pool: 10.1.2.0/24 diff --git a/docs/home/howto/CLUSTER.md b/docs/home/howto/CLUSTER.md index 8f78893d08..19f06ca1a5 100644 --- a/docs/home/howto/CLUSTER.md +++ b/docs/home/howto/CLUSTER.md @@ -284,7 +284,82 @@ From the defined cluster build folder it will take the information needed to rem ## Single machine cluster -TODO +Sometimes it might be desirable to run an Epiphany cluster on a single machine. For this purpose Epiphany ships with a `single_cluster` component configuration. This cluster comes with the following main components: + +- kubernetes-master: Untainted so pods can be deployed on it +- rabbitmq: Rabbitmq for messaging instead of Kafka +- applications: For deploying the Keycloak authentication service +- postgresql: To provide a database for Keycloak + +Note that components like logging and monitoring are missing since they do not provide much benefit in a single machine scenario. Also RabbitMQ is included over Kafka since that is much less resource intensive. + +To get started with a single machine cluster you can use the following template as a base. Note that some configurations are omitted: + +```yaml +kind: epiphany-cluster +title: Epiphany cluster Config +name: default +specification: + prefix: dev + name: single + admin_user: + name: operations + key_path: /user/.ssh/id_rsa + cloud: + ... # add other cloud configuration as needed + components: + kubernetes_master: + count: 0 + kubernetes_node: + count: 0 + logging: + count: 0 + monitoring: + count: 0 + kafka: + count: 0 + postgresql: + count: 0 + load_balancer: + count: 0 + rabbitmq: + count: 0 + ignite: + count: 0 + opendistro_for_elasticsearch: + count: 0 + single_machine: + count: 1 +--- +kind: configuration/applications +title: "Kubernetes Applications Config" +name: default +specification: + applications: + - name: auth-service # this service require postgresql to be installed in cluster + image_path: jboss/keycloak:4.8.3.Final + use_local_image_registry: true + #image_pull_secret_name: regcred + service: + name: as-testauthdb + port: 30104 + replicas: 2 + namespace: namespace-for-auth + admin_user: auth-service-username + admin_password: auth-service-password + database: + name: "auth-database-name" + #port: "5432" # leave it when default + user: "auth-db-user" + password: "auth-db-password" +--- +kind: configuration/kubernetes-master +title: Kubernetes Master Config +name: default +specification: + allow_pods_on_master: true # set to true to enable untaint master for pod deployment + ... # add other kubernetes-master configuration as needed +``` ## How to scale or cluster components From 6a8e7dd858c655f374029b473141cc532e862bab Mon Sep 17 00:00:00 2001 From: Luuk van Venrooij Date: Thu, 26 Mar 2020 09:11:29 +0100 Subject: [PATCH 2/5] Simplified changelog --- CHANGELOG.md | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2d50d1565..be6c40ee19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Development release +# Changelog All notable changes to this project will be documented in linked files. @@ -7,31 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. Reference for actual cluster component versions can be found [here](docs/home/COMPONENTS.md) -## Current release - -### 0.4.x - -- [CHANGELOG-0.4.4](./CHANGELOG-0.4.md#044-2020-04-xx) -- [CHANGELOG-0.4.3](./CHANGELOG-0.4.md#043-2020-03-16) -- [CHANGELOG-0.4.2](./CHANGELOG-0.4.md#042-2019-11-20) -- [CHANGELOG-0.4.1](./CHANGELOG-0.4.md#041-2019-10-17) -- [CHANGELOG-0.4.0](./CHANGELOG-0.4.md#040-2019-09-30) - -## Older releases - -### 0.3.x - -- [CHANGELOG-0.3.0](./CHANGELOG-0.3.md#030-2019-07-31) - -### 0.2.x - -- [CHANGELOG-0.2.3](./CHANGELOG-0.2.md#023-2019-05-20) -- [CHANGELOG-0.2.2](./CHANGELOG-0.2.md#022-2019-03-29) -- [CHANGELOG-0.2.1](./CHANGELOG-0.2.md#021-2019-03-07) -- [CHANGELOG-0.2.0](./CHANGELOG-0.2.md#020-2019-02-19) - -### 0.1.x - -- [CHANGELOG-0.1.2](./CHANGELOG-0.1.md#012-2018-12-05) -- [CHANGELOG-0.1.1](./CHANGELOG-0.1.md#011-2018-11-21) -- [CHANGELOG-0.1.0](./CHANGELOG-0.1.md#010-2018-10-19) +- [CHANGELOG-0.4.x](./CHANGELOG-0.4.md) +- [CHANGELOG-0.3.x](./CHANGELOG-0.3.md) +- [CHANGELOG-0.2.x](./CHANGELOG-0.2.md) +- [CHANGELOG-0.1.x](./CHANGELOG-0.1.md) From e14513c7aab9933392963cc623b93684c50d16c6 Mon Sep 17 00:00:00 2001 From: Luuk van Venrooij Date: Wed, 1 Apr 2020 21:21:31 +0200 Subject: [PATCH 3/5] Backport #1108 and #1110 --- CHANGELOG-0.4.md | 2 ++ .../download-requirements/centos-7/requirements.txt | 3 +++ .../download-requirements/redhat-7/requirements.txt | 3 +++ .../repository/files/server/RedHat/create-repository.sh | 9 ++++++++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-0.4.md b/CHANGELOG-0.4.md index a14ffe632d..ebdcccb733 100644 --- a/CHANGELOG-0.4.md +++ b/CHANGELOG-0.4.md @@ -8,6 +8,8 @@ - [#1043](https://github.com/epiphany-platform/epiphany/issues/1043) - For vm template on Azure disk_size_gb is missing in storage_os_disk - [#1049](https://github.com/epiphany-platform/epiphany/issues/1049) - Azure/RedHat specified disk size 30 GB is smaller than the size of the disk in the VM image - [#1063](https://github.com/epiphany-platform/epiphany/issues/1063) - Issues with single_machine install +- [#1108](https://github.com/epiphany-platform/epiphany/issues/1108) - [Azure RedHat] Create epirepo: package httpd-2.4.6-93 requires httpd-tools = 2.4.6-93 but latest available is 2.4.6-90 +- [#1110](https://github.com/epiphany-platform/epiphany/issues/1110) - Install fixed version of httpd when latest fails (RHEL) ## [0.4.3] 2020-03-16 diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/centos-7/requirements.txt b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/centos-7/requirements.txt index cfc1909b4f..bdbb57577b 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/centos-7/requirements.txt +++ b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/centos-7/requirements.txt @@ -37,6 +37,7 @@ filebeat-6.5.4 # actually it's filebeat-oss firewalld fontconfig # for grafana fping +gnutls # for cifs-utils grafana-6.2.5 gssproxy # for nfs-utils htop @@ -69,6 +70,7 @@ perl-Pod-Perldoc # for vim perl-Pod-Simple # for vim perl-Pod-Usage # for vim policycoreutils-python # for container-selinux +pyldb # for cifs-utils python-firewall # for firewalld python-kitchen # for yum-utils python-lxml # for java-1.8.0-openjdk-headless @@ -91,6 +93,7 @@ rh-postgresql10-postgresql-syspaths samba-client samba-client-libs # for samba-client samba-common +samba-libs # for cifs-utils socat sysstat tar diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/redhat-7/requirements.txt b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/redhat-7/requirements.txt index 01a1406467..97ddb6ea0f 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/redhat-7/requirements.txt +++ b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/redhat-7/requirements.txt @@ -36,6 +36,7 @@ filebeat-6.5.4 # actually it's filebeat-oss firewalld fontconfig # for grafana fping +gnutls # for cifs-utils grafana-6.2.5 gssproxy # for nfs-utils htop @@ -68,6 +69,7 @@ perl-Pod-Perldoc # for vim perl-Pod-Simple # for vim perl-Pod-Usage # for vim policycoreutils-python # for container-selinux +pyldb # for cifs-utils python-firewall # for firewalld python-kitchen # for yum-utils python-lxml # for java-1.8.0-openjdk-headless @@ -88,6 +90,7 @@ rh-postgresql10-postgresql-syspaths samba-client samba-client-libs # for samba-client samba-common +samba-libs # for cifs-utils socat sysstat tar diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/server/RedHat/create-repository.sh b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/server/RedHat/create-repository.sh index 75d250938c..3b93d3a240 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/server/RedHat/create-repository.sh +++ b/core/src/epicli/data/common/ansible/playbooks/roles/repository/files/server/RedHat/create-repository.sh @@ -7,7 +7,14 @@ if $IS_OFFLINE_MODE = true; then # deprecated 'yum localinstall' is used since 'yum install' returns error code when 'nothing to do' yum --cacheonly --disablerepo='*' localinstall -y $(ls $EPI_REPO_SERVER_PATH/packages/repo-prereqs/*.rpm) else - yum install -y httpd createrepo yum-utils + # fix for RHEL 7.6 and 7.7 (#1108): httpd (2.4.6-93) requires httpd-tools = 2.4.6-93 but latest available is 2.4.6-90 + if ! yum install -y httpd createrepo yum-utils; then + echo + echo "WARN: 'yum install -y httpd createrepo yum-utils' FAILED" + echo "INFO: Retrying with fixed version (httpd-2.4.6-90.el7)..." + echo + yum install -y httpd-2.4.6-90.el7 createrepo yum-utils + fi fi systemctl start httpd From f65fac7fd512bc734073270d84ac587dcb99ba1c Mon Sep 17 00:00:00 2001 From: Luuk van Venrooij Date: Thu, 2 Apr 2020 11:34:26 +0200 Subject: [PATCH 4/5] - Disabled un-used commands --- CHANGELOG-0.4.md | 1 + core/src/epicli/cli/epicli.py | 94 ++++++++++++++++++----------------- 2 files changed, 50 insertions(+), 45 deletions(-) diff --git a/CHANGELOG-0.4.md b/CHANGELOG-0.4.md index ebdcccb733..9f66936e80 100644 --- a/CHANGELOG-0.4.md +++ b/CHANGELOG-0.4.md @@ -10,6 +10,7 @@ - [#1063](https://github.com/epiphany-platform/epiphany/issues/1063) - Issues with single_machine install - [#1108](https://github.com/epiphany-platform/epiphany/issues/1108) - [Azure RedHat] Create epirepo: package httpd-2.4.6-93 requires httpd-tools = 2.4.6-93 but latest available is 2.4.6-90 - [#1110](https://github.com/epiphany-platform/epiphany/issues/1110) - Install fixed version of httpd when latest fails (RHEL) +- [#1016](https://github.com/epiphany-platform/epiphany/issues/1016) - Disable verify, backup and recovery as they are not fully implemented ## [0.4.3] 2020-03-16 diff --git a/core/src/epicli/cli/epicli.py b/core/src/epicli/cli/epicli.py index 94386b163c..818c686228 100644 --- a/core/src/epicli/cli/epicli.py +++ b/core/src/epicli/cli/epicli.py @@ -55,15 +55,18 @@ def main(): # setup subparsers subparsers = parser.add_subparsers() - apply_parser(subparsers) - validate_parser(subparsers) + prepare_parser(subparsers) init_parser(subparsers) + apply_parser(subparsers) upgrade_parser(subparsers) - backup_parser(subparsers) - recovery_parser(subparsers) delete_parser(subparsers) - prepare_parser(subparsers) + ''' + validate_parser(subparsers) + backup_parser(subparsers) + recovery_parser(subparsers) + ''' + # check if there were any variables and display full help if len(sys.argv) < 2: parser.print_help() @@ -96,6 +99,19 @@ def main(): return 1 +def prepare_parser(subparsers): + sub_parser = subparsers.add_parser('prepare', description='Creates a folder with all prerequisites to setup the offline requirements to install a cluster offline.') + sub_parser.add_argument('--os', type=str, required=True, dest='os', + help='The OS to prepare the offline requirements for.') + + def run_prepare(args): + adjust_paths_from_output_dir() + with PrepareEngine(args) as engine: + return engine.prepare() + + sub_parser.set_defaults(func=run_prepare) + + def init_parser(subparsers): sub_parser = subparsers.add_parser('init', description='Creates configuration file in working directory.') sub_parser.add_argument('-p', '--provider', dest='provider', choices=['aws', 'azure', 'any'], default='any', @@ -131,20 +147,22 @@ def run_apply(args): sub_parser.set_defaults(func=run_apply) +def upgrade_parser(subparsers): + sub_parser = subparsers.add_parser('upgrade', + description='Upgrades common and K8s components of an existing Epiphany Platform cluster.') + sub_parser.add_argument('-b', '--build', dest='build_directory', type=str, required=True, + help='Absolute path to directory with build artifacts.') + sub_parser.add_argument('--wait-for-pods', dest='wait_for_pods', action="store_true", + help="Waits for all pods to be in the 'Ready' state before proceeding to the next step of the K8s upgrade.") + sub_parser.add_argument('--offline-requirements', dest='offline_requirements', type=str, required=False, + help='Path to the folder with pre-prepared offline requirements.') -def validate_parser(subparsers): - sub_parser = subparsers.add_parser('verify', description='Validates the configuration from file by executing a dry ' - 'run without changing the physical ' - 'infrastructure/configuration') - sub_parser.add_argument('-f', '--file', dest='file', type=str, - help='File with infrastructure/configuration definitions to use.') - - def run_validate(args): - adjust_paths_from_file(args) - with BuildEngine(args) as engine: - return engine.validate() + def run_upgrade(args): + adjust_paths_from_build(args) + with UpgradeEngine(args) as engine: + return engine.upgrade() - sub_parser.set_defaults(func=run_validate) + sub_parser.set_defaults(func=run_upgrade) def delete_parser(subparsers): @@ -160,25 +178,23 @@ def run_delete(args): with DeleteEngine(args) as engine: return engine.delete() - sub_parser.set_defaults(func=run_delete) + sub_parser.set_defaults(func=run_delete) -def upgrade_parser(subparsers): - sub_parser = subparsers.add_parser('upgrade', - description='Upgrades common and K8s components of an existing Epiphany Platform cluster.') - sub_parser.add_argument('-b', '--build', dest='build_directory', type=str, required=True, - help='Absolute path to directory with build artifacts.') - sub_parser.add_argument('--wait-for-pods', dest='wait_for_pods', action="store_true", - help="Waits for all pods to be in the 'Ready' state before proceeding to the next step of the K8s upgrade.") - sub_parser.add_argument('--offline-requirements', dest='offline_requirements', type=str, required=False, - help='Path to the folder with pre-prepared offline requirements.') +''' +def validate_parser(subparsers): + sub_parser = subparsers.add_parser('verify', description='Validates the configuration from file by executing a dry ' + 'run without changing the physical ' + 'infrastructure/configuration') + sub_parser.add_argument('-f', '--file', dest='file', type=str, + help='File with infrastructure/configuration definitions to use.') - def run_upgrade(args): - adjust_paths_from_build(args) - with UpgradeEngine(args) as engine: - return engine.upgrade() + def run_validate(args): + adjust_paths_from_file(args) + with BuildEngine(args) as engine: + return engine.validate() - sub_parser.set_defaults(func=run_upgrade) + sub_parser.set_defaults(func=run_validate) def backup_parser(subparsers): @@ -208,19 +224,7 @@ def run_recovery(args): return engine.recovery() sub_parser.set_defaults(func=run_recovery) - - -def prepare_parser(subparsers): - sub_parser = subparsers.add_parser('prepare', description='Creates a folder with all prerequisites to setup the offline requirements to install a cluster offline.') - sub_parser.add_argument('--os', type=str, required=True, dest='os', - help='The OS to prepare the offline requirements for.') - - def run_prepare(args): - adjust_paths_from_output_dir() - with PrepareEngine(args) as engine: - return engine.prepare() - - sub_parser.set_defaults(func=run_prepare) +''' def experimental_query(): From 1e362ec1e39ee406efb3ff95cbd57f9999d27d33 Mon Sep 17 00:00:00 2001 From: Luuk van Venrooij <11056665+seriva@users.noreply.github.com> Date: Wed, 8 Apr 2020 15:28:37 +0200 Subject: [PATCH 5/5] Update CHANGELOG-0.4.md Co-Authored-By: to-bar <46519524+to-bar@users.noreply.github.com> --- CHANGELOG-0.4.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG-0.4.md b/CHANGELOG-0.4.md index 9f66936e80..78b5469d0a 100644 --- a/CHANGELOG-0.4.md +++ b/CHANGELOG-0.4.md @@ -9,7 +9,6 @@ - [#1049](https://github.com/epiphany-platform/epiphany/issues/1049) - Azure/RedHat specified disk size 30 GB is smaller than the size of the disk in the VM image - [#1063](https://github.com/epiphany-platform/epiphany/issues/1063) - Issues with single_machine install - [#1108](https://github.com/epiphany-platform/epiphany/issues/1108) - [Azure RedHat] Create epirepo: package httpd-2.4.6-93 requires httpd-tools = 2.4.6-93 but latest available is 2.4.6-90 -- [#1110](https://github.com/epiphany-platform/epiphany/issues/1110) - Install fixed version of httpd when latest fails (RHEL) - [#1016](https://github.com/epiphany-platform/epiphany/issues/1016) - Disable verify, backup and recovery as they are not fully implemented ## [0.4.3] 2020-03-16