Bitpoke Boost. Learn more
Note
The recommended way to install Boost is through the Google Cloud Marketplace. If you want to install Boost manually, you can do so by following the next steps.
You can use Cloud Shell or a local workstation to follow the steps below.
You'll need the following tools in your development environment. If you are using
Cloud Shell, then gcloud, kubectl, Docker, and Git are installed in your
environment by default.
echo "gcloud: $(gcloud --version | head -n1)"
echo "kubectl: $(kubectl version --client | head -n1)"
echo "docker: $(docker --version)"
echo "git: $(git version)"
echo "helm: $(helm version --short)"Configure gcloud as a Docker credential helper:
gcloud auth configure-dockerSet cluster parameters:
export PROJECT_ID=
export REGION=us-central1
export CLUSTER=boost-clusterCreate a new GKE Autopilot cluser or, if you already have a cluster, you can skip
this step and use your existing cluster. You can also create a reguar cluster,
by using the gcloud container clusters create command instead of
gcloud container clusters create-auto:
gcloud container clusters create-auto "$CLUSTER" --project "$PROJECT_ID" --region "$REGION"Configure kubectl to connect to the new cluster:
gcloud container clusters get-credentials "$CLUSTER" --project "$PROJECT_ID" --region "$REGION"Clone this repo and the associated tools repo:
git clone https://github.com/bitpoke/boost-public.gitAn Application resource is a collection of individual Kubernetes components, such as Services, StatefulSets, and so on, that you can manage as a group.
To set up your cluster to understand Application resources, run the following command:
kubectl apply -f "https://raw.githubusercontent.com/GoogleCloudPlatform/marketplace-k8s-app-tools/master/crd/app-crd.yaml"You need to run this command once.
The Application resource is defined by the Kubernetes SIG-apps community. The source code can be found on github.com/kubernetes-sigs/application.
Boost uses OpenID Connect for authentication. You can use any OIDC provider (like Auth0 or Google Cloud).
To configure Google Cloud, you can follow the tutorial at: https://www.bitpoke.io/docs/app-for-wordpress/installation/authentication/
If you are using the visual install interface from the Google Cloud Marketplace, you can skip now to Expose the application to the internet
Set up the image tag:
It is advised to use stable image reference which you can find on Marketplace Container Registry. Example:
export TAG="0.1.9"Alternatively you can use short tag which points to the latest image for selected version.
Warning
This tag is not stable and referenced image might change over time.
export TAG="0.1"Configure the image registry:
export REGISTRY="us-docker.pkg.dev/bitpoke-public/boost"Choose the instance name and namespace for the app. In most cases, you can use the default namespace.
export APP_INSTANCE_NAME=bitpoke-boost-1
export NAMESPACE=defaultConfigure the application parametes.
export BOOST_BRANDING_NAME=
export BOOST_BRANDING_LOGO_URL=
export OIDC_ISSUER_URL=https://accounts.google.com
export OIDC_CLIENT_ID=
export OIDC_CLIENT_SECRET=
export OIDC_REDIRECT_URL= # https://example.com/auth/callbackhelm template charts/boost --set 'crd.enable=true' -s 'templates/crd/*' | kubectl apply -f-Create the Application default roles:
helm template -n "$NAMESPACE" "$APP_INSTANCE_NAME" charts/boost \
--set "controllerManager.serviceAccountName=$APP_INSTANCE_NAME" \
--set "rbac.enable=true" \
-s templates/rbac/wordpress_job_invoker_role.yaml \
-s templates/rbac/leader_election_role.yaml \
-s templates/rbac/role.yaml | \
kubectl apply -f-Create the service account for the application:
helm template -n "$NAMESPACE" "$APP_INSTANCE_NAME" charts/boost \
--set "controllerManager.serviceAccountName=$APP_INSTANCE_NAME" \
--set "rbac.enable=true" \
-s templates/rbac/service_account.yaml | \
kubectl apply -f-Create the cluster role binding for the service account:
helm template -n "$NAMESPACE" "$APP_INSTANCE_NAME" charts/boost \
--set "controllerManager.serviceAccountName=$APP_INSTANCE_NAME" \
--set "rbac.enable=true" \
-s templates/rbac/leader_election_role_binding.yaml \
-s templates/rbac/role_binding.yaml | \
kubectl apply -f-Use helm template to expand the template. We recommend that you save the
expanded manifest file for future updates to your app.
helm template -n "$NAMESPACE" "$APP_INSTANCE_NAME" charts/boost \
--set "controllerManager.serviceAccountName=$APP_INSTANCE_NAME" \
--set "env.BOOST_BRANDING_NAME=$BOOST_BRANDING_NAME" \
--set "env.BOOST_BRANDING_LOGO_URL=$BOOST_BRANDING_LOGO_URL" \
--set "env.OIDC_ISSUER_URL=$OIDC_ISSUER_URL" \
--set "env.OIDC_CLIENT_ID=$OIDC_CLIENT_ID" \
--set "env.OIDC_CLIENT_SECRET=$OIDC_CLIENT_SECRET" \
--set "env.OIDC_REDIRECT_URL=$OIDC_REDIRECT_URL" \
--set "controllerManager.container.image.repository=$REGISTRY/boost" \
--set "controllerManager.container.image.tag=$TAG" \
--set "values.mutagen.image.repository=$REGISTRY/boost/syncer" \
--set "values.mutagen.image.tag=$TAG" \
--set "wpInvokerImage=$REGISTRY/boost/wp-invoker:$TAG" \
--no-hooks \
--skip-crds --set 'crd.enable=false'\
> "${APP_INSTANCE_NAME}_manifest.yaml"To apply the manifest to your Kubernetes cluster, use kubectl:
kubectl apply -f "${APP_INSTANCE_NAME}_manifest.yaml" --namespace "${NAMESPACE}"To get the Cloud Console URL for your app, run the following command:
echo "https://console.cloud.google.com/kubernetes/application/${REGION}/${CLUSTER}/${NAMESPACE}/${APP_INSTANCE_NAME}?project=${PROJECT_ID}"To view the app, open the URL in your browser.
Go to https://console.cloud.google.com/sql/instances and create an instance.
To expose the application to the internet, you can use the Gateway resource. Or alternatively, you could use an Ingress resource, but this is not documented here. Now, you can run the ./install.sh script:
./install.shWait until the HTTPRoute is Accepted and ready to route traffic.
kubectl describe httproute -n ${NAMESPACE} ${APP_INSTANCE_NAME}./seed.sh > seed_manifest.yaml
kubectl apply -f seed_manifest.yamlThe application is now available under the selected domain!