Skip to content

Commit

Permalink
Merge pull request #193 from ytsarev/actualize-readme
Browse files Browse the repository at this point in the history
Update README with up-to-date instructions
  • Loading branch information
ytsarev authored Aug 12, 2024
2 parents 7ed59dc + bfa2e2a commit efd77dc
Showing 1 changed file with 38 additions and 27 deletions.
65 changes: 38 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ curl -sL https://cli.upbound.io | sh
```
See [up docs](https://docs.upbound.io/cli/) for more install options.

To intstall `crossplane` CLI follow https://docs.crossplane.io/latest/cli/#installing-the-cli

We need a running Crossplane control plane to install our instance. We are
using [Universal Crossplane (UXP)](https://github.com/upbound/universal-crossplane).
Ensure that your kubectl context points to the correct Kubernetes cluster or
Expand All @@ -87,9 +89,12 @@ kind create cluster
Finally install UXP into the `upbound-system` namespace:

```console
up uxp install
up uxp install --set='args[0]=--enable-usages'
```

We will need [Usages](https://docs.crossplane.io/latest/concepts/usages/) alpha feature
for the correct deployment and eventual de-provisioning of this reference platform.

You can validate the install by inspecting all installed components:

```console
Expand All @@ -103,14 +108,20 @@ configuration package](https://docs.crossplane.io/latest/concepts/packages/)
so there is a single command to install it:

```console
up ctp configuration install xpkg.upbound.io/upbound/platform-ref-aws:v0.7.0
up ctp configuration install xpkg.upbound.io/upbound/platform-ref-aws:v1.1.0
```

Validate the install by inspecting the provider and configuration packages:
```console
kubectl get providers,providerrevision

kubectl get configurations,configurationrevisions
kubectl get configurations --watch
```

After all Configurations are ready, you can check the status of associated
Providers that were pulled as dependencies

```console
kubectl get providers,providerrevision
```

Check the
Expand All @@ -133,7 +144,7 @@ kubectl create secret generic aws-creds -n upbound-system --from-file=credential
kubectl apply -f examples/aws-default-provider.yaml
```

See [provider-aws docs](https://marketplace.upbound.io/providers/upbound/provider-family-aws/v0.43.1)
See [provider-aws docs](https://marketplace.upbound.io/providers/upbound/provider-family-aws)
for more detailed configuration options.

## Using the AWS reference platform
Expand All @@ -152,16 +163,16 @@ kubectl apply -f examples/cluster-claim.yaml

Create a custom defined database:
```console
kubectl apply -f examples/postgres-claim.yaml
kubectl apply -f examples/mariadb-claim.yaml
```

**NOTE**: The database abstraction relies on the cluster claim to be ready - it
uses the same network to have connectivity with the EKS cluster.

Alternatively, you can use a mariadb claim:
Alternatively, you can use a postgresql claim:

```
kubectl apply -f examples/mariadb-claim.yaml
kubectl apply -f examples/postgres-claim.yaml
```

Now deploy the sample application:
Expand All @@ -170,17 +181,26 @@ Now deploy the sample application:
kubectl apply -f examples/app-claim.yaml
```

**NOTE**: application has a strong dependency on mariadb type of the database

You can verify the status by inspecting the claims, composites and managed
resources:

```console
kubectl get claim,composite,managed
```

To get nice representation of the Claim deployment status you can use
[crossplane beta trace](https://docs.crossplane.io/latest/cli/command-reference/#beta-trace) command

```console
crossplane beta trace cluster.aws.platformref.upbound.io/platform-ref-aws
```

To delete the provisioned resources you would simply delete the claims:

```console
kubectl delete -f examples/cluster-claim.yaml,examples/postgres-claim.yaml
kubectl delete -f examples/cluster-claim.yaml,examples/mariadb-claim.yaml,examples/app-claim.yaml
```

To uninstall the provider & platform configuration:
Expand Down Expand Up @@ -224,7 +244,7 @@ account](https://accounts.upbound.io/register) to push your custom platform.
Afterwards you can log in:

```console
up login --username=$ORG

```

### Make the changes
Expand All @@ -242,34 +262,25 @@ To share your new platform you need to build and distribute this package.
To build the package use the `up xpkg build` command:

```console
up xpkg build --name package.xpkg --package-root=package --examples-root=examples
up xpkg build --name package.xpkg --package-root=. --examples-root=examples --ignore=".github/workflows/*.yaml,.github/workflows/*.yml,examples/*.yaml,.work/uptest-datasource.yaml"
```

Afterwards you can push it to the marketplace. Don't worry - it's private to you.
Afterwards you can push it to the marketplace. It will be not automatically
listed but the OCI repository will be publicly accessible.

```console
TAG=v0.1.0
up repo create ${PLATFORM}
up xpkg push ${ORG}/${PLATFORM}:${TAG} -f package/package.xpkg
```

You can now see your listing in the marketplace:
```console
open https://marketplace.upbound.io/configurations/${ORG}/${PLATFORM}/${TAG}
up repo -a $ORG create ${PLATFORM}
up xpkg push ${ORG}/${PLATFORM}:${TAG} -f package.xpkg
```

## Using your custom platform

Now to use your custom platform, you can follow the steps above. The only
difference is that you need to specify a package-pull-secret, as the package is
currently private:

```console
up ctp pull-secret create personal-pull-secret
```
Now to use your custom platform, you can pull the Configuration package from
your repository

```console
up ctp configuration install xpkg.upbound.io/${ORG}/${PLATFORM}:${TAG} --package-pull-secrets=personal-pull-secret
up ctp configuration install xpkg.upbound.io/${ORG}/${PLATFORM}:${TAG}
```

For the alternative declarative installation approach see the [example Configuration
Expand Down

0 comments on commit efd77dc

Please sign in to comment.