Skip to content

Commit 6538ad4

Browse files
committed
Installer to install the UI stack in native mode on podman.
Signed-off-by: Anil Vishnoi <[email protected]>
1 parent 5403efd commit 6538ad4

File tree

6 files changed

+549
-19
lines changed

6 files changed

+549
-19
lines changed

api-server/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ ifeq ($(APISERVER_RACE_DETECTOR),1)
2828
CGO_ENABLED=1
2929
APISERVER_BUILD_FLAGS+=-race
3030
endif
31-
ifneq ($(APISERVER_BUILD_TAGS),)
32-
APISERVER_BUILD_FLAGS+=-tags $(APISERVER_BUILD_TAGS)
33-
endif
3431
ifeq ($(CGO_ENABLED),0)
3532
APISERVER_LDFLAGS+=-extldflags=-static
3633
endif
@@ -75,7 +72,6 @@ dist/packages: \
7572

7673
dist/packages/%: apiserver
7774
$(CMD_PREFIX) mkdir -p $(basename $(basename $@))
78-
$(CMD_PREFIX) cp README.md $(basename $(basename $@))
7975
$(CMD_PREFIX) cp dist/apiserver-$(subst apiserver-,,$(basename $(basename $(@F))))$(if $(findstring windows,$@),.exe) $(basename $(basename $@))/ilab-apiserver$(if $(findstring windows,$@),.exe)
8076
$(CMD_PREFIX) if test "$(word 2,$(subst -, ,$(shell basename $@)))" = "windows" ; then \
8177
printf " %-12s dist/packages/$(@F)\n" "[ZIP]" ;\

api-server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func (srv *ILabServer) runServer(cmd *cobra.Command, args []string) {
214214
srv.ilabCmd = ilabPath
215215
} else {
216216
// Use ilab from virtual environment
217-
srv.ilabCmd = filepath.Join(srv.baseDir, "venv", "bin", "ilab")
217+
srv.ilabCmd = filepath.Join(srv.baseDir, "bin", "ilab")
218218
if _, err := os.Stat(srv.ilabCmd); os.IsNotExist(err) {
219219
srv.log.Fatalf("ilab binary not found at %s. Please ensure the virtual environment is set up correctly.", srv.ilabCmd)
220220
}

deploy/podman/native/README.md

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,62 @@
33

44
Please follow the below instructions to deploy UI stack with Native mode enabled in Podman.
55

6-
## Generate Secret
6+
## Deploy using the installer (Recommended)
7+
8+
Make a temporary directory and download the installer
9+
10+
```shell
11+
mkdir instructlab-ui
12+
cd instructlab-ui
13+
14+
curl -fsSL https://raw.githubusercontent.com/instructlab/ui/refs/heads/main/installers/podman/ilab-ui-native-installer.sh
15+
```
16+
17+
Give execution permission to the install
18+
19+
```shell
20+
chmod a+x ilab-ui-native-installer.sh
21+
```
22+
23+
Execute the installer and follow the instructions prompted on the terminal.
24+
25+
If your deployment machine has InstructLab (ilab CLI) setup, either on the host or in python virtual environment, use the following command
26+
27+
```shell
28+
./ilab-ui-native-installer.sh --username <USERNAME> --password <PASSWORD>
29+
30+
e.g ./ilab-ui-native-installer.sh --username admin --password passw0rd
31+
```
32+
33+
If your deployment machine don't have InstructLab CLI setup, please clone the taxonomy repo and fire the following command.
34+
35+
```shell
36+
./ilab-ui-native-installer.sh --username <USERNAME> --password <PASSWORD> --taxonomy-dir <TAXONOMY_DIR>
37+
38+
e.g ./ilab-ui-native-installer.sh --username admin --password passw0rd --taxonomy-dir /Users/johndoe/instructlab/taxonomy
39+
```
40+
41+
>[!NOTE]
42+
> In the absence of InstructLab CLI, UI won't be able to support the synthetic data generation and fine tuning, but skill and knowledge contribution should work as expected.
43+
44+
If you are deploying the UI stack on a remote machine, please provide the auth url in the input
45+
46+
```shell
47+
./ilab-ui-native-installer.sh --username <USERNAME> --password <PASSWORD> --taxonomy-dir <TAXONOMY_DIR> --auth-url http://<REMOTE-IP>:3000
48+
```
49+
50+
Please use `--help` to see more options supported by the installer.
51+
52+
## Deploy manually
53+
54+
If you would like to install the UI stack manually, it's a two step process
55+
56+
- Generate the secret file with the required input
57+
- Deploy the UI stack manifest file using podman.
758

859
A secret is required to provide required input to the UI stack in a secure way.
960

10-
Two options exist to generate the secret, either using `kubectl` or filling in values in the `secret.yaml` provided.
61+
There are two options to generate the secret's file, either using `kubectl` or filling in values in the `secret.yaml` provided.
1162

1263
### Generate secrets using kubectl
1364

@@ -46,17 +97,17 @@ echo "password" | base64
4697

4798
Using the above to fill in all the required input fields.
4899

49-
## Deploy the secret
100+
### Deploy the secret
50101

51102
Now that the `secret.yaml` has been generated, use `podman kube play` to load the secret.
52103

53104
```bash
54105
podman kube play secret.yaml
55106
```
56107

57-
## Deploying the InstructLab UI Stack
108+
### Deploy the InstructLab UI Stack
58109

59-
One last step before you launch the InstructLab UI. A file named [instructlab-ui.yaml](instructlab-ui.yaml) present in the [native](../native/) directory. Search for <TAXONOMY_REPO_ROOT_DIR> in the yaml file and replace it with the same value that is used while creating the secret.yaml file. Now with the secret in place and deployment yaml updated, use `podman kube play` to launch the containers. UI will look for the taxonomy repo in this directory to submit the skill and knowledge contributions.
110+
One last step before you launch the InstructLab UI. A file named [instructlab-ui.yaml](instructlab-ui.yaml) present in the [native](../native/) directory. Search for <TAXONOMY_ROOT_DIR> in the yaml file and replace it with the same value that is used while creating the secret.yaml file. Now with the secret in place and deployment yaml updated, use `podman kube play` to launch the containers. UI will look for the taxonomy repo in this directory to submit the skill and knowledge contributions.
60111

61112
```bash
62113
podman kube play instructlab-ui.yaml

deploy/podman/native/instructlab-ui.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,5 @@ spec:
127127
volumes:
128128
- name: taxonomy-repo
129129
hostPath:
130-
path: <TAXONOMY_REPO_ROOT_DIR>
130+
path: <TAXONOMY_ROOT_DIR>
131131
type: Directory

deploy/podman/native/secret.yaml.example

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apiVersion: v1
22
data:
3-
IL_ENABLE_DEV_MODE: ZmFsc2U=
4-
IL_UI_ADMIN_PASSWORD:
5-
IL_UI_ADMIN_USERNAME:
6-
IL_UI_DEPLOYMENT: bmF0aXZl
7-
NEXT_PUBLIC_EXPERIMENTAL_FEATURES: dHJ1ZQ==
8-
NEXT_PUBLIC_TAXONOMY_ROOT_DIR:
9-
NEXTAUTH_SECRET:
10-
NEXTAUTH_URL: aHR0cDovL2xvY2FsaG9zdDozMDAw
3+
IL_UI_ADMIN_PASSWORD: <PASSWORD>
4+
IL_UI_ADMIN_USERNAME: <USERNAME>
5+
IL_UI_DEPLOYMENT: <UI_DEPLOYMENT>
6+
IL_ENABLE_DEV_MODE: <DEV_MODE>
7+
NEXT_PUBLIC_EXPERIMENTAL_FEATURES: <EXPERIMENTAL_FEATURES>
8+
NEXT_PUBLIC_TAXONOMY_ROOT_DIR: <TAXONOMY_ROOT_DIR>
9+
NEXTAUTH_URL: <AUTH_URL>
10+
NEXTAUTH_SECRET: <AUTH_SECRET>
1111
kind: Secret
1212
metadata:
1313
creationTimestamp: null

0 commit comments

Comments
 (0)