diff --git a/README.md b/README.md index 8a99cb1a..638d427e 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,41 @@ # Insights Frontend Operator -### Local development +A Kubernetes operator designed to deploy and managed containerized frontends. -You need to run kubernetess locally, we rocommend using [minikube](https://minikube.sigs.k8s.io/docs/). +## Usage -0. start minikube [Prerequisite] +The operator is generally availble in the Consoledot Ephemeral and Dev Clusters. In order to use the Frontend Operator, +you only need to apply a Frontend CRD to a namespace that you manage using Bonfire. + +## Deploying a Frontend with Bonfire in ephemeral + +[Bonfire](https://github.com/RedHatInsights/bonfire#bonfire-) is the consoledot tool used to interact with Kuberentes clusters. + +Simply login to the ephemeral cluster and run `bonfire deploy $MYAPP --frontends true -d 8h` to get access to your own ephemeral environment. + +If your app does not have an entry into app-interface yet, `bonfire namespace reserve` will supply you with a bootstrapped +namespace to deploy your application with `oc apply -f $My-Frontend-CRD.yaml -n $NS` + +## Local development for contributions + +**Note**: We only recommend this method for local development on the **operator** **itself**. + +Please use the above section to develop an app that depends on this operator. + +### Environment Setup + +You need to run kubernetes locally, we recommend [minikube](https://minikube.sigs.k8s.io/docs/). + +The frontend operator is dependent on [Clowder](https://github.com/RedHatInsights/clowder#getting-clowder). +Follow those directions to get Clowder running and continue along. + +Once Clowder is up and running (`oc get pod -n clowder-system` has a running `controller-manager`), there are two +options we can use to proceed. + +0. create boot namespace ``` -minikube start --addons=ingress +kubectl create namespace boot ``` 1. apply frontend CRD @@ -22,34 +50,34 @@ kubectl apply -f config/crd/bases/cloud.redhat.com_frontends.yaml kubectl apply -f config/crd/bases/cloud.redhat.com_bundles.yaml ``` -3. create boot namespace +3. Create the ClowdEnvironment (Clowder CRD) ``` -kubectl create namespace boot +kubectl apply -f examples/clowdenvironment.yaml ``` 4. create frontend env ``` -kubectl apply -f environment.yaml -n boot +kubectl apply -f examples/feenvironment.yaml -n boot ``` 5. create custom object inventory ``` -kubectl apply -f inventory.yml -n boot +kubectl apply -f examples/inventory.yaml -n boot ``` 6. create bundle ``` -kubectl apply -f bundle.yaml -n boot +kubectl apply -f examples/bundle.yaml -n boot ``` -7. create bundle +7. create chrome deployment ``` -kubectl apply -f chrome.yml -n boot +kubectl apply -f chrome.yaml -n boot ``` 8. run the reconciler diff --git a/examples/ansible_nav.yaml b/examples/ansible-nav.yaml similarity index 100% rename from examples/ansible_nav.yaml rename to examples/ansible-nav.yaml diff --git a/examples/chrome.yml b/examples/chrome.yaml similarity index 100% rename from examples/chrome.yml rename to examples/chrome.yaml diff --git a/examples/clowdenvironment.yaml b/examples/clowdenvironment.yaml new file mode 100644 index 00000000..79b05f8e --- /dev/null +++ b/examples/clowdenvironment.yaml @@ -0,0 +1,105 @@ +apiVersion: cloud.redhat.com/v1alpha1 +kind: ClowdEnvironment +metadata: + name: env-boot +spec: + providers: + autoScaler: {} + db: + mode: local + deployment: + omitPullPolicy: true + featureFlags: + credentialRef: + name: "" + namespace: "" + mode: local + inMemoryDb: + mode: redis + kafka: + cluster: + jvmOptions: {} + resources: + limits: + cpu: 500m + memory: 1Gi + requests: + cpu: 250m + memory: 600Mi + version: 3.0.0 + connect: + image: quay.io/cloudservices/xjoin-kafka-connect-strimzi:latest + resources: + limits: + cpu: 500m + memory: 1Gi + requests: + cpu: 250m + memory: 512Mi + version: 3.0.0 + enableLegacyStrimzi: true + ephemManagedSecretRef: + name: "" + namespace: "" + managedSecretRef: + name: "" + namespace: "" + mode: operator + logging: + mode: none + metrics: + mode: operator + path: /metrics + port: 9000 + prometheus: {} + objectStore: + mode: minio + pullSecrets: + - name: quay-cloudservices-pull + namespace: boot + serviceMesh: {} + sidecars: + tokenRefresher: + enabled: false + testing: + configAccess: environment + iqe: + imageBase: quay.io/cloudservices/iqe-tests + resources: + limits: + cpu: "1" + memory: 2Gi + requests: + cpu: 200m + memory: 1Gi + ui: + selenium: + defaultImageTag: ff_91.5.1esr_gecko_v0.30.0_chrome_98.0.4758.80 + imageBase: quay.io/redhatqe/selenium-standalone + resources: + limits: + cpu: "1" + memory: 3Gi + requests: + cpu: 500m + memory: 2Gi + vaultSecretRef: + name: iqe-vault + namespace: ephemeral-base + k8sAccessLevel: edit + web: + images: {} + ingressClass: openshift-default + mode: local + port: 8000 + privatePort: 10000 + resourceDefaults: + limits: + cpu: 300m + memory: 256Mi + requests: + cpu: 30m + memory: 128Mi + serviceConfig: + type: "" + targetNamespace: boot \ No newline at end of file diff --git a/examples/environment.yaml b/examples/feenvironment.yaml similarity index 100% rename from examples/environment.yaml rename to examples/feenvironment.yaml diff --git a/examples/hac_nav.yaml b/examples/hac-nav.yaml similarity index 100% rename from examples/hac_nav.yaml rename to examples/hac-nav.yaml diff --git a/examples/inventory.yml b/examples/inventory.yaml similarity index 100% rename from examples/inventory.yml rename to examples/inventory.yaml diff --git a/examples/landing_nav.yaml b/examples/landing-nav.yaml similarity index 100% rename from examples/landing_nav.yaml rename to examples/landing-nav.yaml diff --git a/examples/landing.yml b/examples/landing.yaml similarity index 100% rename from examples/landing.yml rename to examples/landing.yaml