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

CI/CD for Azure deployments #79

Closed
9 tasks done
pwalsh opened this issue Nov 20, 2019 · 4 comments
Closed
9 tasks done

CI/CD for Azure deployments #79

pwalsh opened this issue Nov 20, 2019 · 4 comments
Assignees

Comments

@pwalsh
Copy link
Contributor

pwalsh commented Nov 20, 2019

Requires #78

WIP

We need to be able to set up a k8s cluster + everything around it (nfs, db, permissions) using terraform so that cco cluster initialize passes correctly.

Acceptance Criteria

  • We are able to set up Azure K8 cluster using terraform
  • We are able to do helm based deployment on that cluster
  • We can access the deployed running CKAN instance from browser

Tasks

  • Download and install terraform
  • Read about terraform, play around with it, maybe deploy hello world somewhere, somehow
  • Try to setup K8 environment manually first
    • Initialize Cluster
    • Deploy CKAN instance
  • Try to setup K8 environment with terraform

Walkthrough

Download and install terraform (linux 64bit)

# Install terraform
wget -O terraform.zip https://releases.hashicorp.com/terraform/0.12.18/terraform_0.12.18_linux_amd64.zip &&\
unzip terraform.zip &&\
sudo mv terraform /usr/local/bin/ &&\
terraform

# Intall Azure CLI and login
curl -L https://aka.ms/InstallAzureCli | bash
az login

# Create AZ service Princibal (user with limited perms)
SUBSCRIPTION_ID=your_subscription_id_from_login
az account set --subscription="${SUBSCRIPTION_ID}"
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/${SUBSCRIPTION_ID}"

#!/bin/sh
echo "Setting environment variables for Terraform"
export ARM_SUBSCRIPTION_ID=your_subscription_id
export ARM_CLIENT_ID=your_appId
export ARM_CLIENT_SECRET=your_password
export ARM_TENANT_ID=your_tenant_id
export ARM_ENVIRONMENT=public

Analysis

QA

  • What are the manual steps?
  • What are semi-manual steps?
  • What info Do we need to start therefor? Eg superuser credentials from azure or similar...
@pwalsh pwalsh mentioned this issue Nov 27, 2019
2 tasks
@zelima zelima self-assigned this Dec 16, 2019
@zelima
Copy link
Collaborator

zelima commented Jan 15, 2020

On every PR/push to the branch, using travis and terraform, we are

  • creating azure kubernetes cluster
  • creating azuresql server and Database instance
  • Initializing CKAN Cloud Cluster
  • Deploying CKAN instance with helm based deployment using CCO
  • destroying after fail/success

For now, we are not checking instance accessible on localhost. Successful deploy mean CKAN is up and running.

@pwalsh
Copy link
Contributor Author

pwalsh commented Jan 22, 2020

@akariv @zelima is this in a state for me to do acceptance testing yet?

@zelima
Copy link
Collaborator

zelima commented Jan 22, 2020

Still needs to be merged #105

@zelima
Copy link
Collaborator

zelima commented Nov 19, 2020

FIXED

@zelima zelima closed this as completed Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants