diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 07a7512..48f715d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,6 +1,9 @@ name: E2E Testing on: push: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" jobs: docker-build: diff --git a/README.md b/README.md index 45e6a37..e8a0820 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Ansible playbooks to deploy Apigee Hybrid using Helm Charts +[![E2E Testing](https://github.com/apigee/ansible-apigee-hybrid-accelerator/actions/workflows/testing.yml/badge.svg)](https://github.com/apigee/ansible-apigee-hybrid-accelerator/actions/workflows/testing.yml) + This repository contains a set of Ansible roles and playbooks to manage the installation, configuration and maintenance of Apigee Hybrid in your environment. Apigee Hybrid components are managed using helm charts through ansible roles.Apigee Hybrid combines the power of Apigee's API management with the flexibility and control of Kubernetes. With this playbooks, you can automate common Apigee Hybrid management tasks, making it easier to deploy, configure, and maintain your Apigee Hybrid clusters. @@ -25,25 +27,43 @@ You can use the Apigee terraform [module](https://github.com/GoogleCloudPlatform ##### Manual packages to install You can follow manual steps to install the below packages -- `python3 -m pip install requests==2.25.1 jsonschema==4.19.1 jsonschema-specifications==2023.7.1 ansible-core==2.15.5 ansible==8.5.0` +- ``` + python3 -m pip install --no-cache-dir \ + requests==2.25.1 \ + jsonschema==4.19.1 \ + jsonschema-specifications==2023.7.1 \ + jmespath==1.0.1 \ + kubernetes==27.2.0 \ + ansible-core==2.15.5 \ + ansible==8.5.0 + ``` - `helm >3.10` refer https://helm.sh/docs/intro/install/ - `gcloud cli` refer https://cloud.google.com/sdk/docs/install - `kubectl` refer https://cloud.google.com/sdk/docs/components#installing_components +To continue to install follow the [steps](#configure-ansible-variables) + OR -##### Use Ansible to install packages +##### Use Docker Image -Install [ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) +Install [docker](https://docs.docker.com/engine/install/) -Use the playbook to deploy. -> NOTE: The `pre-req.yaml` playbook has not been tested on all OS flavours. -> Use with caution +Run the below command to build the docker image +``` +docker build -t : . +``` + +To run the playbooks using docker ``` -sudo ansible-playbook pre-req.yaml -e 'install_helm=true' -e 'install_pip=true' -e 'install_helm=true' +docker run -it -v $(pwd):/app : /bin/bash +cd /app ``` +To continue to install follow the [steps](#configure-ansible-variables) + + ### Configure Ansible Variables Before using the Ansible playbooks you need to configure the necessary variables. diff --git a/decommission.yaml b/decommission.yaml index 1fb90d7..683f377 100644 --- a/decommission.yaml +++ b/decommission.yaml @@ -24,6 +24,7 @@ tags: - dc2 roles: + - { role: prepare-helm, tags: ['prepare-helm'] } - { role: apigee-hybrid-overrides, tags: ['generate-overrides']} tasks: - name: un-deploy environment @@ -63,6 +64,7 @@ tags: - dc2 roles: + - { role: prepare-helm, tags: ['prepare-helm'] } - { role: apigee-hybrid-overrides, tags: ['generate-overrides'] } - { role: helm-ops, vars: { release_name: '{{ overrides.gcp.projectID }}', chart_ref: 'apigee-org', release_state: absent }, tags: ['apigeeorg', 'apigeeorgs'] } - { role: helm-ops, vars: { release_name: 'datastore', chart_ref: 'apigee-datastore', release_state: absent }, tags: ['ds', 'apigeeds'] } @@ -87,6 +89,7 @@ tags: - dc1 roles: + - { role: prepare-helm, tags: ['prepare-helm'] } - { role: apigee-hybrid-overrides, tags: ['generate-overrides'] } tasks: - name: un-deploy environment @@ -126,6 +129,7 @@ tags: - dc1 roles: + - { role: prepare-helm, tags: ['prepare-helm'] } - { role: apigee-hybrid-overrides, tags: ['generate-overrides'] } - { role: helm-ops, vars: { release_name: '{{ overrides.gcp.projectID }}', chart_ref: 'apigee-org', release_state: absent }, tags: ['apigeeorg', 'apigeeorgs'] } - { role: helm-ops, vars: { release_name: 'datastore', chart_ref: 'apigee-datastore', release_state: absent }, tags: ['ds', 'apigeeds'] } diff --git a/test/terraform/runtime-plane-gke/terraform.tfvars b/test/terraform/runtime-plane-gke/terraform.tfvars index 80f8647..55b75ec 100644 --- a/test/terraform/runtime-plane-gke/terraform.tfvars +++ b/test/terraform/runtime-plane-gke/terraform.tfvars @@ -25,7 +25,8 @@ service_account_name = "apigee-gke-svc-account" kubernetes_version = "1.26.7-gke.500" master_ipv4_cidr_block = "10.220.0.0/28" master_authorized_networks = [ - { cidr_block = "10.132.0.0/20", display_name = "europe-west1-subnet" } + { cidr_block = "10.132.0.0/20", display_name = "europe-west1-subnet" }, + { cidr_block = "172.17.0.0/16", display_name = "docker-gh-runner" }, ] cluster_resource_labels = {