Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: updated readme & build cadence #21

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: E2E Testing
on:
push:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

jobs:
docker-build:
Expand Down
34 changes: 27 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.


Expand All @@ -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 <image_name>:<image_tag> .
```

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 <image_name>:<image_tag> /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.
Expand Down
4 changes: 4 additions & 0 deletions decommission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'] }
Expand All @@ -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
Expand Down Expand Up @@ -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'] }
Expand Down
3 changes: 2 additions & 1 deletion test/terraform/runtime-plane-gke/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Loading