Skip to content

Commit

Permalink
[Misc] Improve the installation component sequence (#252)
Browse files Browse the repository at this point in the history
* Adjust component deployment sequence

1. Move kuberay from dependency to default
2. Remove namespace and rely on kustomize to manage namespace and sequence

* Update generated names in kuberay dependency

kustomize will apend aibrix prefix by default so we do not need to use helm template to generate aibrix prefix after we move kuberay from config/dependency to config/default

* Correct role and rolebinding names for aibrix

* [doc] Add the FAQ page to track comment issues

* Rename the kuberay manifest folder name

* Make corresponding kuberay rename changes
  • Loading branch information
Jeffwan authored Sep 27, 2024
1 parent 5e35a16 commit 2ce3b56
Show file tree
Hide file tree
Showing 35 changed files with 67 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/installation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
cd ${{ github.workspace }}
cd config/gateway && kustomize edit set image plugins=aibrix/plugins:${{ github.sha }} && kustomize edit set image users=aibrix/users:${{ github.sha }}
cd ${{ github.workspace }}
kubectl apply -k config/default
kubectl create -k config/default
- name: Check pod status
run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cd aibrix
kubectl create -k config/dependency

# Install aibrix components
kubectl apply -k config/default
kubectl create -k config/default
```

Install stable distribution
Expand All @@ -37,7 +37,7 @@ Install stable distribution
kubectl create -k "github.com/aibrix/aibrix/config/dependency?ref=v0.1.0-rc.1"

# Install aibrix components
kubectl apply -k "github.com/aibrix/aibrix/config/default?ref=v0.1.0-rc.1"
kubectl create -k "github.com/aibrix/aibrix/config/default?ref=v0.1.0-rc.1"
```

## Documentation
Expand Down
1 change: 1 addition & 0 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ resources:
- ../rbac
- ../manager
- ../gateway
- ../dependency/kuberay-operator
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
#- ../webhook
Expand Down
9 changes: 9 additions & 0 deletions config/dependency/kuberay-operator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## KubeRay upstream manifests

Commands to export manifest from helm package. After you got manifest, copy to this folder.

```shell
helm template kuberay-operator kuberay/kuberay-operator --namespace aibrix-system --version 1.2.1 --include-crds --set env[0].name=ENABLE_PROBES_INJECTION --set env[0].value=\"false\" --set fullnameOverride=kuberay-operator --output-dir ./config/dependency
```

If you use zsh, please use `noglob helm ...` to skip the brace check.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ kind: Kustomization

# KubeRay helm package doesn't allow namespace setting at this moment, we can not export resources with namespace specified
# The workaround is to use kustomize namespace override to create under aibrix-system namespace.
namespace: aibrix-system

resources:
- crds/ray.io_rayclusters.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: aibrix-kuberay-operator
name: kuberay-operator
labels:
app.kubernetes.io/name: kuberay-operator
helm.sh/chart: kuberay-operator-1.2.1
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
Expand All @@ -16,12 +16,12 @@ spec:
selector:
matchLabels:
app.kubernetes.io/name: kuberay-operator
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
template:
metadata:
labels:
app.kubernetes.io/name: kuberay-operator
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
app.kubernetes.io/component: kuberay-operator
spec:
serviceAccountName: kuberay-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
labels:
app.kubernetes.io/name: kuberay-operator
helm.sh/chart: kuberay-operator-1.2.1
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
app.kubernetes.io/managed-by: Helm
name: aibrix-kuberay-operator-leader-election
name: kuberay-operator-leader-election
rules:
- apiGroups:
- ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ metadata:
labels:
app.kubernetes.io/name: kuberay-operator
helm.sh/chart: kuberay-operator-1.2.1
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
app.kubernetes.io/managed-by: Helm
name: aibrix-kuberay-operator-leader-election
name: kuberay-operator-leader-election
subjects:
- kind: ServiceAccount
name: kuberay-operator
namespace: aibrix-system
roleRef:
kind: Role
name: aibrix-kuberay-operator-leader-election
name: kuberay-operator-leader-election
apiGroup: rbac.authorization.k8s.io
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
labels:
app.kubernetes.io/name: kuberay-operator
helm.sh/chart: kuberay-operator-1.2.1
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
app.kubernetes.io/managed-by: Helm
name: rayjob-editor-role
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
labels:
app.kubernetes.io/name: kuberay-operator
helm.sh/chart: kuberay-operator-1.2.1
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
app.kubernetes.io/managed-by: Helm
name: rayjob-viewer-role
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ metadata:
labels:
app.kubernetes.io/name: kuberay-operator
helm.sh/chart: kuberay-operator-1.2.1
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
app.kubernetes.io/managed-by: Helm
name: aibrix-kuberay-operator
name: kuberay-operator
rules:
- apiGroups:
- batch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ metadata:
labels:
app.kubernetes.io/name: kuberay-operator
helm.sh/chart: kuberay-operator-1.2.1
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
app.kubernetes.io/managed-by: Helm
name: aibrix-kuberay-operator
name: kuberay-operator
subjects:
- kind: ServiceAccount
name: kuberay-operator
namespace: aibrix-system
roleRef:
kind: ClusterRole
name: aibrix-kuberay-operator
name: kuberay-operator
apiGroup: rbac.authorization.k8s.io
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
apiVersion: v1
kind: Service
metadata:
name: aibrix-kuberay-operator
name: kuberay-operator
labels:
app.kubernetes.io/name: kuberay-operator
helm.sh/chart: kuberay-operator-1.2.1
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
Expand All @@ -18,4 +18,4 @@ spec:
name: http
selector:
app.kubernetes.io/name: kuberay-operator
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ metadata:
labels:
app.kubernetes.io/name: kuberay-operator
helm.sh/chart: kuberay-operator-1.2.1
app.kubernetes.io/instance: aibrix-kuberay-operator
app.kubernetes.io/instance: kuberay-operator
app.kubernetes.io/managed-by: Helm
9 changes: 0 additions & 9 deletions config/dependency/kuberay/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions config/dependency/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
kind: Kustomization

resources:
- namespace.yaml
- envoy-gateway
- kuberay
6 changes: 0 additions & 6 deletions config/dependency/namespace.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion config/rbac/leader_election_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
app.kubernetes.io/name: aibrix
app.kubernetes.io/managed-by: kustomize
name: leader-election-role
name: controller-manager-leader-election-role
rules:
- apiGroups:
- ""
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/leader_election_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
labels:
app.kubernetes.io/name: aibrix
app.kubernetes.io/managed-by: kustomize
name: leader-election-rolebinding
name: controller-manager-leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: leader-election-role
name: controller-manager-leader-election-role
subjects:
- kind: ServiceAccount
name: controller-manager
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: manager-role
name: controller-manager-role
rules:
- apiGroups:
- ""
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
labels:
app.kubernetes.io/name: aibrix
app.kubernetes.io/managed-by: kustomize
name: manager-rolebinding
name: controller-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: manager-role
name: controller-manager-role
subjects:
- kind: ServiceAccount
name: controller-manager
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions docs/source/getting_started/faq.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. _faq:

===
FAQ
===

FAQ - Installation
------------------

Failed to delete the AIBrix
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. figure:: ../assets/images/delete-namespace-stuck-1.png
:alt: aibrix-architecture-v1
:width: 70%
:align: center

.. figure:: ../assets/images/delete-namespace-stuck-2.png
:alt: aibrix-architecture-v1
:width: 70%
:align: center

In this case, you just need to find the model adapter, edit the object, and remove the ``finalizer`` pair. the pod would be deleted automatically.

2 changes: 1 addition & 1 deletion docs/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Nightly Version
kubectl create -k config/dependency
# Install aibrix components
kubectl apply -k config/default
kubectl create -k config/default
Install AIBrix on Kind Cluster
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Documentation
designs/architecture.rst
getting_started/quickstart.rst
getting_started/installation.rst
getting_started/faq.rst

.. toctree::
:maxdepth: 1
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/rayclusterfleet/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var _ = BeforeSuite(func() {
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{
filepath.Join("..", "..", "..", "config", "crd", "bases"),
filepath.Join("..", "..", "..", "config", "dependency", "kuberay", "crds", "ray.io_rayclusters.yaml"),
filepath.Join("..", "..", "..", "config", "dependency", "kuberay-operator", "crds", "ray.io_rayclusters.yaml"),
},
ErrorIfCRDPathMissing: true,

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/rayclusterreplicaset/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var _ = BeforeSuite(func() {
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{
filepath.Join("..", "..", "..", "config", "crd", "bases"),
filepath.Join("..", "..", "..", "config", "dependency", "kuberay", "crds", "ray.io_rayclusters.yaml"),
filepath.Join("..", "..", "..", "config", "dependency", "kuberay-operator", "crds", "ray.io_rayclusters.yaml"),
},
ErrorIfCRDPathMissing: true,

Expand Down

0 comments on commit 2ce3b56

Please sign in to comment.