Wordpress example stack
A wordpress stack with a simple controller to press wordpresses!
Using
Install the Crossplane stack CLI
First, install the Crossplane stack
CLI.
Install
If kubectl
is set up to talk to a Crossplane control cluster, the
stack can be installed using the stack cli:
kubectl crossplane stack install crossplane/sample-stack-wordpress
Create wordpresses
Before wordpresses will provision, the Crossplane control cluster must
be configured to connect to a provider.
Once a provider is configured, starting the process of creating a
wordpress is easy. Create a wordpress instance like the sample
shows:
apiVersion: wordpress.samples.stacks.crossplane.io/v1alpha1
kind: WordpressInstance
metadata:
name: wordpressinstance-sample
The stack (and Crossplane) will take care of the rest.
Developing
Prerequisites
This assumes that there is a crossplane running locally.
See the crossplane project for instructions on how to get that working.
It also assumes that you have the crossplane
cli installed.
Workflow
To build, publish, and install the stack locally, do something like:
kubectl crossplane stack build local-build
kubectl crossplane stack build stack-install
To uninstall the stack locally:
kubectl crossplane stack build stack-uninstall
To run locally out-of-cluster:
- Delete the deployment that the stack manager created
make run
; I like to use make manager run
to ensure that it
rebuilds
How to publish the latest version of the stack
Build the controller, bundle the stack, and publish the stack:
make
kubectl crossplane stack build
kubectl crossplane stack publish
You may also need to log into docker:
docker login