|
| 1 | +--- |
| 2 | +title: Getting started |
| 3 | +weight: 10 |
| 4 | +aliases: /maas-quickstart/getting-started/ |
| 5 | +--- |
| 6 | + |
| 7 | +:toc: |
| 8 | +:imagesdir: /images |
| 9 | +:_content-type: ASSEMBLY |
| 10 | +include::modules/comm-attributes.adoc[] |
| 11 | + |
| 12 | +[id="deploying-maas-quickstart-pattern"] |
| 13 | +== Deploying the MaaS Code Assistant AI Quickstart pattern |
| 14 | + |
| 15 | +.Prerequisites |
| 16 | + |
| 17 | +* An OpenShift cluster (version 4.20 or later). This pattern requires at least 2 NVIDIA GPU nodes with 48 GB or more of VRAM each. |
| 18 | + ** *AWS*: The pattern automatically provisions 2 `g6e.2xlarge` GPU worker nodes (NVIDIA L40S) during installation. No GPU nodes need to be present before deploying. |
| 19 | + ** *Other providers and bare metal*: GPU nodes must already be part of the OpenShift cluster before deploying this pattern. The pattern installs all required operators automatically. |
| 20 | + ** To create an OpenShift cluster, go to the https://console.redhat.com/[Red Hat Hybrid Cloud console]. |
| 21 | + ** Select *OpenShift \-> Red Hat OpenShift Container Platform \-> Create cluster*. |
| 22 | +* The Helm binary. For instructions, see link:https://helm.sh/docs/intro/install/[Installing Helm]. |
| 23 | +* The `oc` CLI tool. For instructions, see link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/getting-started-cli.html[Getting started with the OpenShift CLI]. |
| 24 | +* Additional installation tool dependencies. For details, see link:https://validatedpatterns.io/learn/quickstart/[Patterns quick start]. |
| 25 | + |
| 26 | +[id="preparing-for-deployment-maas"] |
| 27 | +== Preparing for deployment |
| 28 | +.Procedure |
| 29 | + |
| 30 | +. Fork the link:https://github.com/validatedpatterns-sandbox/ai-quickstart-maas-code-assistant[ai-quickstart-maas-code-assistant] repository on GitHub. You must fork the repository to customize this pattern. |
| 31 | + |
| 32 | +. Clone the forked copy of this repository. |
| 33 | ++ |
| 34 | +[source,terminal] |
| 35 | +---- |
| 36 | +$ git clone git@github.com:your-username/ai-quickstart-maas-code-assistant.git |
| 37 | +---- |
| 38 | + |
| 39 | +. Go to the root directory of your Git repository: |
| 40 | ++ |
| 41 | +[source,terminal] |
| 42 | +---- |
| 43 | +$ cd ai-quickstart-maas-code-assistant |
| 44 | +---- |
| 45 | + |
| 46 | +. Run the following command to set the upstream repository: |
| 47 | ++ |
| 48 | +[source,terminal] |
| 49 | +---- |
| 50 | +$ git remote add -f upstream git@github.com:validatedpatterns-sandbox/ai-quickstart-maas-code-assistant.git |
| 51 | +---- |
| 52 | + |
| 53 | +. Verify the setup of your remote repositories by running the following command: |
| 54 | ++ |
| 55 | +[source,terminal] |
| 56 | +---- |
| 57 | +$ git remote -v |
| 58 | +---- |
| 59 | ++ |
| 60 | +.Example output |
| 61 | ++ |
| 62 | +[source,terminal] |
| 63 | +---- |
| 64 | +origin git@github.com:your-username/ai-quickstart-maas-code-assistant.git (fetch) |
| 65 | +origin git@github.com:your-username/ai-quickstart-maas-code-assistant.git (push) |
| 66 | +upstream git@github.com:validatedpatterns-sandbox/ai-quickstart-maas-code-assistant.git (fetch) |
| 67 | +upstream git@github.com:validatedpatterns-sandbox/ai-quickstart-maas-code-assistant.git (push) |
| 68 | +---- |
| 69 | + |
| 70 | +. Make a local copy of the secrets template outside of your repository to hold credentials for the pattern. |
| 71 | ++ |
| 72 | +[WARNING] |
| 73 | +==== |
| 74 | +Do not add, commit, or push this file to your repository. Doing so may expose personal credentials to GitHub. |
| 75 | +==== |
| 76 | ++ |
| 77 | +Run the following command: |
| 78 | ++ |
| 79 | +[source,terminal] |
| 80 | +---- |
| 81 | +$ cp values-secret.yaml.template ~/values-secret-ai-quickstart-maas-code-assistant.yaml |
| 82 | +---- |
| 83 | + |
| 84 | +. Populate this file with the user passwords needed for the pattern: |
| 85 | ++ |
| 86 | +[source,terminal] |
| 87 | +---- |
| 88 | +$ vim ~/values-secret-ai-quickstart-maas-code-assistant.yaml |
| 89 | +---- |
| 90 | + |
| 91 | +.. Edit the `htpasswd` section to set passwords for each user tier: |
| 92 | ++ |
| 93 | +[source,yaml] |
| 94 | +---- |
| 95 | + - name: htpasswd |
| 96 | + fields: |
| 97 | + - name: admin |
| 98 | + value: <admin-password> |
| 99 | + - name: free-user |
| 100 | + value: <free-user-password> |
| 101 | + - name: premium-user |
| 102 | + value: <premium-user-password> |
| 103 | + - name: enterprise-user |
| 104 | + value: <enterprise-user-password> |
| 105 | +---- |
| 106 | + |
| 107 | +. Optional: To customize the deployment, create and switch to a new branch by running the following command: |
| 108 | ++ |
| 109 | +[source,terminal] |
| 110 | +---- |
| 111 | +$ git checkout -b my-branch |
| 112 | +---- |
| 113 | ++ |
| 114 | +Make your changes, then stage and commit them: |
| 115 | ++ |
| 116 | +[source,terminal] |
| 117 | +---- |
| 118 | +$ git add <changed-files> |
| 119 | +$ git commit -m "Customize deployment" |
| 120 | +---- |
| 121 | ++ |
| 122 | +Push the changes to your forked repository: |
| 123 | ++ |
| 124 | +[source,terminal] |
| 125 | +---- |
| 126 | +$ git push origin my-branch |
| 127 | +---- |
| 128 | + |
| 129 | +[id="deploying-cluster-using-patternsh-file-maas"] |
| 130 | +== Deploying the pattern by using the pattern.sh file |
| 131 | + |
| 132 | +To deploy the pattern by using the `pattern.sh` file, complete the following steps: |
| 133 | + |
| 134 | +. Log in to your cluster by following this procedure: |
| 135 | + |
| 136 | +.. Obtain an API token by visiting link:https://oauth-openshift.apps.<your_cluster>.<domain>/oauth/token/request[https://oauth-openshift.apps.<your_cluster>.<domain>/oauth/token/request]. |
| 137 | + |
| 138 | +.. Log in to the cluster by running the following command: |
| 139 | ++ |
| 140 | +[source,terminal] |
| 141 | +---- |
| 142 | +$ oc login --token=<retrieved-token> --server=https://api.<your_cluster>.<domain>:6443 |
| 143 | +---- |
| 144 | ++ |
| 145 | +Or log in by running the following command: |
| 146 | ++ |
| 147 | +[source,terminal] |
| 148 | +---- |
| 149 | +$ export KUBECONFIG=~/<path_to_kubeconfig> |
| 150 | +---- |
| 151 | + |
| 152 | +. Deploy the pattern to your cluster. Run the following command: |
| 153 | ++ |
| 154 | +[source,terminal] |
| 155 | +---- |
| 156 | +$ ./pattern.sh make install |
| 157 | +---- |
| 158 | + |
| 159 | +.Verification |
| 160 | + |
| 161 | +To verify a successful installation, check the health of the ArgoCD applications: |
| 162 | + |
| 163 | +. Run the following command: |
| 164 | ++ |
| 165 | +[source,terminal] |
| 166 | +---- |
| 167 | +$ ./pattern.sh make argo-healthcheck |
| 168 | +---- |
| 169 | ++ |
| 170 | +It might take several minutes for all applications to synchronize and reach a healthy state. This includes downloading the NVIDIA Nemotron models and configuring the inference endpoints. |
| 171 | + |
| 172 | +. Verify that the Operators are installed by navigating to *Operators -> Installed Operators* in the {ocp} web console. Confirm the following Operators are present: |
| 173 | ++ |
| 174 | +* NVIDIA GPU Operator |
| 175 | +* {rhoai} |
| 176 | +* Red Hat OpenShift DevSpaces |
| 177 | +* Red Hat Connectivity Link |
| 178 | + |
| 179 | +. After all applications are healthy, verify the inference endpoints are serving by running: |
| 180 | ++ |
| 181 | +[source,terminal] |
| 182 | +---- |
| 183 | +$ oc get inferenceservice -A |
| 184 | +---- |
| 185 | + |
| 186 | +. Access the OpenShift DevSpaces dashboard to confirm the IDE environment is available. Navigate to *Networking -> Routes* in the DevSpaces namespace and open the route URL. |
0 commit comments