Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit de77b5b

Browse files
author
ArtemisCloud Bot
committed
Update docs to main
1 parent 3362c42 commit de77b5b

File tree

5 files changed

+931
-73
lines changed

5 files changed

+931
-73
lines changed

Diff for: content/en/docs/help/bundle.md

+44-73
Original file line numberDiff line numberDiff line change
@@ -13,87 +13,43 @@ weight: 630
1313
toc: true
1414
---
1515

16-
# Bunding A Bundle and Deploy it into the Operator Lifecycle Manager(OLM)
16+
# Bundle
1717

18-
## About the Operator Lifecycle Manager (OLM)
18+
## Operator Lifecycle Manager (OLM)
19+
The [Operator Lifecycle Manager](https://olm.operatorframework.io/) can help users to install and manage operators. The ArtemisCloud operator can be built into a bundle image and installed into OLM.
1920

20-
The [Operator Lifecycle Manager](https://olm.operatorframework.io/) can help users to install and manage operators.
21-
The ArtemisCloud operator can be built into a bundle image and installed into OLM.
21+
### Install OLM
22+
Check out the latest [releases on github](https://github.com/operator-framework/operator-lifecycle-manager/releases) for release-specific install instructions.
2223

23-
## Building
24+
## Create a repository
25+
Create a repository that Kubernetes will uses to pull your catalog image. You can create a public one for free on quay.io, see [how to create a repo](https://docs.quay.io/guides/create-repo.html).
2426

25-
### Creating the bundle's manifests/metadata
26-
27-
Before you build the bundle image generate the manifests and metadata:
28-
29-
```$xslt
30-
make IMAGE_TAG_BASE=<bundle image registry> OPERATOR_IMAGE_REPO=<operator image registry> OPERATOR_VERSION=<operator tag> bundle
31-
```
32-
33-
### Building the bundle image:
34-
35-
```$xslt
36-
make IMAGE_TAG_BASE=<bundle image registry> bundle-build
37-
```
38-
The result image tag takes the form like
39-
```$xslt
40-
${IMAGE_TAG_BASE}-bundle:v0.0.1
27+
## Build a catalog image
28+
Set your repository in CATALOG_IMG and execute the following command:
4129
```
42-
Note: the version v0.0.1 is defined by VERSION variable in the Makefile
43-
44-
To push the built bundle image
45-
46-
```$xslt
47-
make IMAGE_TAG_BASE=<bundle image registry> bundle-push
30+
make CATALOG_IMG=quay.io/my-org/activemq-artemis-operator-index:latest catalog-build
4831
```
4932

50-
### Building the catalog image
51-
52-
Now with the bundle image in place, build the catalog(index) iamge:
53-
54-
```$xslt
55-
make IMAGE_TAG_BASE=<bundle image registry> catalog-build
33+
## Push a catalog image
34+
Set your repository in CATALOG_IMG and execute the following command:
5635
```
57-
The result image tag takes the form like
58-
```$xslt
59-
${IMAGE_TAG_BASE}-index:v0.0.1
36+
make CATALOG_IMG=quay.io/my-org/activemq-artemis-operator-index:latest catalog-push
6037
```
6138

62-
To push the catalog image to repo:
63-
64-
```$xslt
65-
make IMAGE_TAG_BASE=<bundle image registry> catalog-push
66-
```
67-
68-
## Installing operator via OLM (Minikube)
69-
70-
### Install olm (If olm is not installed already)
71-
72-
Make sure the Minikube is up and running.
73-
74-
Use the [operator-sdk tool](https://sdk.operatorframework.io/):
75-
76-
```$xslt
77-
operator-sdk olm install
78-
```
79-
It will deploy the latest olm into Minikube.
80-
81-
### Create a catalog source (e.g. catalog-source.yaml):
39+
## Create a catalog source (e.g. catalog-source.yaml):
40+
Before creating the catalog source, ensure to update the **image** field within the `spec` section with your own built catalog image specified by the `CATALOG_IMG` environment variable.
41+
For the `CATALOG_IMG`, refer to the [Build a catalog image](#build-a-catalog-image) section.
8242

8343
```
8444
apiVersion: operators.coreos.com/v1alpha1
8545
kind: CatalogSource
8646
metadata:
87-
name: artemis-index
47+
name: activemq-artemis-operator-source
8848
namespace: operators
8949
spec:
50+
displayName: ActiveMQ Artemis Operators
51+
image: quay.io/my-org/activemq-artemis-operator-index:latest
9052
sourceType: grpc
91-
image: quay.io/hgao/operator-catalog:v0.0.1
92-
displayName: ArtemisCloud Index
93-
publisher: ArtemisCloud
94-
updateStrategy:
95-
registryPoll:
96-
interval: 10m
9753
```
9854

9955
and deploy it:
@@ -104,25 +60,24 @@ $ kubectl create -f catalog-source.yaml
10460
In a moment you will see the index image is up and running in namespace **operators**:
10561

10662
```$xslt
107-
[a]$ kubectl get pod -n operators
108-
NAME READY STATUS RESTARTS AGE
109-
artemis-index-bzh75 1/1 Running 0 42s
63+
$ kubectl get pod -n operators
64+
NAME READY STATUS RESTARTS AGE
65+
activemq-artemis-operator-source-g94fd 1/1 Running 0 42s
11066
```
11167

112-
### Creating a subscription (e.g. subscription.yaml)
68+
## Create a subscription (e.g. subscription.yaml)
11369

11470
```
11571
apiVersion: operators.coreos.com/v1alpha1
11672
kind: Subscription
11773
metadata:
118-
name: my-subscription
74+
name: activemq-artemis-operator-subscription
11975
namespace: operators
12076
spec:
12177
channel: upstream
12278
name: activemq-artemis-operator
123-
source: artemis-index
79+
source: activemq-artemis-operator-source
12480
sourceNamespace: operators
125-
installPlanApproval: Automatic
12681
```
12782

12883
and deploy it:
@@ -134,7 +89,23 @@ An operator will be installed into **operators** namespace.
13489
```$xslt
13590
$ kubectl get pod -n operators
13691
NAME READY STATUS RESTARTS AGE
137-
9365c56f188be1738a1fabddb5a408a693d8c1f2d7275514556644e52ejpdpj 0/1 Completed 0 2m20s
138-
activemq-artemis-controller-manager-84d58db649-tkt89 1/1 Running 0 117s
139-
artemis-index-frpn4 1/1 Running 0 3m35s
92+
069c5d363d51fc04d639086da1c5180883a6cea8ec9d9f9eedde1a55f6v7jsq 0/1 Completed 0 9m55s
93+
activemq-artemis-controller-manager-54c99b9df6-6xdzh 1/1 Running 0 9m28s
94+
activemq-artemis-operator-source-g94fd 1/1 Running 0 58m
95+
```
96+
97+
## Create a single ActiveMQ Artemis
98+
99+
This step creates a single ActiveMQ Artemis broker instance by applying the custom resource (CR) defined in artemis_single.yaml file.
100+
101+
```$xslt
102+
$ kubectl apply -f examples/artemis/artemis_single.yaml
140103
```
104+
105+
To check the status of the broker, run:
106+
107+
```$xslt
108+
$ kubectl get ActivemqArtemis
109+
NAME READY AGE
110+
artemis-broker True 39s
111+
```

Diff for: content/en/docs/help/hostname_resolution.md

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
---
2+
title: "Resolve you cluster domain"
3+
description: "Various possible configuration to make your local cluster domain
4+
resolvable"
5+
draft: false
6+
images: []
7+
menu:
8+
docs:
9+
parent: "help"
10+
weight: 110
11+
toc: true
12+
---
13+
14+
If you are running a local `k8s` instance, you might want to configure your
15+
local setup so that it is able to resolve the domain of the cluster. So that
16+
out-of-cluster running programs can access your services.
17+
18+
There are a couple of options available to you, all with their pros & cons. We
19+
will list some of them in this document. Note that this is not a exhaustive
20+
coverage of all the possibilities and feel free to contribute to the
21+
documentation if you have other ways of doing this.
22+
23+
## Prerequisite
24+
25+
Before you start, you need to have access to a running Kubernetes cluster
26+
environment. A [Minikube](https://minikube.sigs.k8s.io/docs/start/) instance
27+
running on your laptop will do fine.
28+
29+
### Start minikube with a parametrized `dns-domain` name
30+
31+
```console
32+
$ minikube start --dns-domain='demo.artemiscloud.io'
33+
34+
😄 minikube v1.32.0 on Fedora 39
35+
🎉 minikube 1.33.1 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.33.1
36+
💡 To disable this notice, run: 'minikube config set WantUpdateNotification false'
37+
38+
✨ Automatically selected the kvm2 driver. Other choices: qemu2, ssh
39+
👍 Starting control plane node minikube in cluster minikube
40+
🔥 Creating kvm2 VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
41+
🐳 Preparing Kubernetes v1.28.3 on Docker 24.0.7 ...
42+
▪ Generating certificates and keys ...
43+
▪ Booting up control plane ...
44+
▪ Configuring RBAC rules ...
45+
🔗 Configuring bridge CNI (Container Networking Interface) ...
46+
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
47+
🔎 Verifying Kubernetes components...
48+
🌟 Enabled addons: storage-provisioner, default-storageclass
49+
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
50+
```
51+
52+
Get minikube's ip
53+
54+
```console
55+
minikube ip
56+
192.168.39.54
57+
```
58+
59+
Note that every time you restart minikube you'll have to follow update the ip in
60+
the configuration files.
61+
62+
## /etc/hosts
63+
64+
The generic way to make the url resolve to an IP address is to update the
65+
`/etc/hosts/`. There's no wildcard in this file, this means you'll need to
66+
specify all the urls you are interested in.
67+
68+
Here's an example for an ingress:
69+
```console
70+
$ cat /etc/hosts
71+
192.168.39.54 ing.sslacceptor.send-receive-0.send-receive-project.demo.artemiscloud.io
72+
```
73+
### pros
74+
75+
* Works on every setup and is simple
76+
77+
### cons
78+
79+
* No wildcard, you need to list every domains and subdomains you'll need to access
80+
81+
## NetworkManager's DNSMasq plugin
82+
83+
We will use networkmanager's dnsmasq plugin
84+
([source](https://fedoramagazine.org/using-the-networkmanagers-dnsmasq-plugin/))to
85+
configure the ip associated with the domain `demo.artemiscloud.io`. The dnsmasq plugin
86+
has wildcards which is better than setting manually every hosts in the
87+
`/etc/hosts` file.
88+
89+
### Configure DNSMasq
90+
91+
The goal here is to set up enable dnsmasq and to make it resolve your cluster
92+
domain `demo.artemiscloud.io` to the cluster's ip address. Because DNSMasq has a
93+
wildcard, all subdomains will also resolve to the same ip address.
94+
95+
1. Create the following files:
96+
97+
```console
98+
$ cat << EOF > /etc/NetworkManager/conf.d/00-use-dnsmasq.conf
99+
[main]
100+
dns=dnsmasq
101+
EOF
102+
```
103+
104+
```console
105+
$ cat << EOF > /etc/NetworkManager/dnsmasq.d/00-demo.artemiscloud.io.conf
106+
local=/demo.artemiscloud.io/
107+
address=/.demo.artemiscloud.io/192.168.39.54
108+
EOF
109+
```
110+
111+
```console
112+
$ cat << EOF > /etc/NetworkManager/dnsmasq.d/02-add-hosts.conf
113+
addn-hosts=/etc/hosts
114+
EOF
115+
```
116+
117+
2. restart NetworkManager:
118+
119+
```console
120+
$ sudo systemctl restart NetworkManager
121+
```
122+
123+
### pros
124+
125+
* Has wildcard, you only need to setup the ip once
126+
127+
### Cons
128+
129+
* Works only with NetworkManager
130+
131+
## Minikube's `ingress-dns` plugin:
132+
133+
[Follow the official documentation.](https://minikube.sigs.k8s.io/docs/handbook/addons/ingress-dns/)
134+
135+
### pros
136+
137+
* Has wildcard, you only need to setup the ip once
138+
* Supported for every setup (linux, mac, windows)
139+
140+
### cons
141+
142+
* Can only resolve the ingresses URLs

0 commit comments

Comments
 (0)