daiteap-platform is the daiteap application logic which allows you to create and manage multi-cloud resources in an easy and efficient manner. Currently you can setup Kubernetes clusters, Compute (VMs) and S3 storage on one or multiple providers.
This repository contains the backend and API for daiteap.
Follow the steps below to run Daiteap locally (Linux, Windows WSL2).
Requirements:
- docker/docker-compose (Docker Daemon must be running. Windows/Mac start Docker Desktop)
- GIT
- DNS zone in GCP (optional)
- jq (cmd JSON parser tool)
# clone and cd into this repository
git clone git@github.com:Daiteap/daiteap-platform.git
cd daiteap-platform
# generate ssh keys
mkdir -p docker-compose/.ssh
ssh-keygen -o -a 100 -t rsa -f docker-compose/.ssh/id_rsa -C "user@server.com" -N "" -m PEM# Install jq
sudo apt-get install jq
Mac User can use alternatively
brew install jq
# Init environment (first start only - open new terminal, cd to ./daiteap-platform and do)
source docker-compose/init.shNote: If you are using GCP make sure you have uploaded the images and set the access keys in the docker-compose/daiteap_image_credentials.json file.
Once you install an application from the service catalog you can access it by IP-Adress or using the DNS option to access the service by Domain Name.
- Existing Google Cloud DNS Zone
- Service account with DNS Administrator permissions
- Service account key in JSON format
# replace docker-compose/daiteap_dns_credentials.json with your service account key
cp <path to service account key> docker-compose/daiteap_dns_credentials.json
# start daiteap
USE_DNS_FOR_SERVICES=True \
SERVICES_DNS_DOMAIN=<replace with dns zone domain> \
SERVICES_DNS_ZONE_NAME=<replace with zone name> \
docker-compose up -ddocker-compose up -ddocker exec daiteap-vault vault operator unseal $(jq -r .unseal_keys_b64[0] docker-compose/vault/vault-init.json)Navigate to http://localhost:1899
# (optional) see container logs
docker-compose logs -f
# (optional) check container state
docker-compose psdocker-compose down --rmi local -v
sudo rm -rf docker-compose/.ssh
sudo rm -rf docker-compose/mysql
sudo rm -rf docker-compose/vault/data
sudo rm -rf docker-compose/vault/vault-init.jsonInstructions to build custom Daiteap images using packer.io. All scripts are located in the packer folder.
Create packer user in AWS IAM and add required policies to build AMIs: Policy:
- AmazonEC2FullAccess
- AWSMarketplaceImageBuildFullAccess
- IAMUserSSHKeys
- EC2InstanceProfileForImageBuilder
- AWSImageBuilderFullAccess
Configure AWS access parameters:
export AWS_ACCESS_KEY=XXXXXXXXXXX
export AWS_SECRET_KEY=YYYYYYYYYYYBuild and upload image to AWS
packer init aws-ubuntu.pkr.hcl
packer validate -var aws_access_key=$AWS_ACCESS_KEY -var aws_secret_key=$AWS_SECRET_KEY aws-ubuntu.pkr.hcl
packer build -var aws_access_key=$AWS_ACCESS_KEY -var aws_secret_key=$AWS_SECRET_KEY aws-ubuntu.pkr.hclConfigure GCP access parameters:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.jsonBuild and upload image to GCP
packer init google-ubuntu.pkr.hcl
packer validate google-ubuntu.pkr.hcl
packer build google-ubuntu.pkr.hclCreate a GCP access key, which has access to the images you just uploaded.
Add the key to the docker-compose/daiteap_image_credentials.json file.
Configure Azure access parameters:
export azure_tenant_id=XXX
export azure_subscription_id=YYY
export azure_client_id=ZZZ
export azure_client_secret=WWWBuild and upload image to Azure
packer init azure-ubuntu.pkr.hcl
packer validate -var azure_client_id=$azure_client_id -var azure_client_secret=$azure_client_secret -var azure_subscription_id=$azure_subscription_id -var azure_tenant_id=$azure_tenant_id azure-ubuntu.pkr.hcl
packer build -var azure_client_id=$azure_client_id -var azure_client_secret=$azure_client_secret -var azure_subscription_id=$azure_subscription_id -var azure_tenant_id=$azure_tenant_id azure-ubuntu.pkr.hclTODO:
URL daiteap.com