Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove UI component. It's now hosted in instructlab/ui repository #412

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
exclude_paths:
- compose.yaml
- .github/
- ui/
82 changes: 0 additions & 82 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,88 +48,6 @@ jobs:
cache-to: type=gha,mode=max
file: gobot/Containerfile

push_to_registries_ui:
name: Push UI container image to GHCR
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/setup-buildx-action@v3

- name: Extract metadata (tags, labels) for UI image
id: ui_meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}/bot-ui

- name: Build and push ui image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
build-args: |
GITHUB_USER=instructlab-bot
GITHUB_TOKEN=${{ secrets.BOT_GITHUB_TOKEN }}
push: true
tags: ${{ steps.ui_meta.outputs.tags }}
labels: ${{ steps.ui_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
file: ui/Containerfile

push_to_registries_apiserver:
name: Push apiserver container image to GHCR
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/setup-buildx-action@v3

- name: Extract metadata (tags, labels) for apiserver image
id: apiserver_meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}/apiserver

- name: Build and push apiserver image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
build-args: |
GITHUB_USER=instructlab-bot
GITHUB_TOKEN=${{ secrets.BOT_GITHUB_TOKEN }}
push: true
tags: ${{ steps.apiserver_meta.outputs.tags }}
labels: ${{ steps.apiserver_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
file: ui/apiserver/Containerfile

push_to_registries_serve:
name: Push serve container image to GHCR
runs-on: ubuntu-latest
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/lint-ui.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ globs:
- "**/*.md"
ignores:
- "pkg"
- "**/node_modules/*"
- "**/node_modules/**"
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ We'd also love PRs. If you're thinking of a large PR, we advise opening up an is
## Submitting a pull request

1. [Fork][fork] and clone the repository.
1. Configure and install the dependencies: `npm install`.
1. Make sure the tests pass on your machine: `npm test`, note: these tests also apply the linter, so there's no need to lint separately.
1. Create a new branch: `git checkout -b my-branch-name`.
1. Make your change, add tests, and make sure the tests still pass.
1. Push to your fork and [submit a pull request][pr].
1. Pat your self on the back and wait for your pull request to be reviewed and merged.
2. Create a new branch: `git checkout -b my-branch-name`.
3. Make your change, add tests, and make sure the tests still pass.
4. Push to your fork and [submit a pull request][pr].
5. Pat your self on the back and wait for your pull request to be reviewed and merged.

Here are a few things you can do that will increase the likelihood of your pull request being accepted:

Expand Down
26 changes: 1 addition & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,7 @@ ilabserve-base-image: worker/Containerfile.servebase ## Build container image fo
$(ECHO_PREFIX) printf " %-12s worker/Containerfile.servebase\n" "[PODMAN]"
$(CMD_PREFIX) podman build -f worker/Containerfile.servebase -t ghcr.io/instructlab/instructlab-bot/instructlab-serve-base:main .

apiserver-image: ui/apiserver/Containerfile ## Build continaer image for the Apiserver
$(ECHO_PREFIX) printf " %-12s ui/apiserver/Containerfile\n" "[PODMAN]"
$(CMD_PREFIX) podman build -f ui/apiserver/Containerfile -t ghcr.io/instructlab/instructlab-bot/apiserver:main .

ui-image: ui/Containerfile ## Build continaer image for the bot ui
$(ECHO_PREFIX) printf " %-12s ui/Containerfile\n" "[PODMAN]"
$(CMD_PREFIX) podman build -f ui/Containerfile -t ghcr.io/instructlab/instructlab-bot/bot-ui:main .

all-images: gobot-image worker-test-image apiserver-image ui-image ## Build all container images
all-images: gobot-image worker-test-image ## Build all container images
$(ECHO_PREFIX) printf " %-12s BUILD ALL CONTAINER IMAGES\n"

.PHONY: gobot
Expand Down Expand Up @@ -154,28 +146,12 @@ run-dev: ## Deploy the bot development stack.
$(ECHO_PREFIX) printf "Deploy the development stack\n"
$(CMD_PREFIX) podman compose -f ./deploy/compose/dev-single-worker-compose.yaml up -d

.PHONY: run-dev-ui
run-dev-ui: ## Deploy the bot development stack with the UI components.
$(ECHO_PREFIX) printf " %-12s \n" "[RUN DEV UI STACK]"
$(CMD_PREFIX) if [ ! -f .env ]; then \
echo ".env not found. Copy .env.example to .env and configure it." ; \
exit 1 ; \
fi
$(ECHO_PREFIX) printf "Deploy the development stack with UI components\n"
$(CMD_PREFIX) podman compose -f ./deploy/compose/dev-single-worker-with-ui.yaml up -d

.PHONY: stop-dev
stop-dev: ## Stop the bot development stack.
$(ECHO_PREFIX) printf " %-12s \n" "[STOP DEV STACK]"
$(ECHO_PREFIX) printf "Stop the development stack\n"
$(CMD_PREFIX) podman compose -f ./deploy/compose/dev-single-worker-compose.yaml down

.PHONY: stop-dev-ui
stop-dev-ui: ## Stop the bot development stack with the UI components.
$(ECHO_PREFIX) printf " %-12s \n" "[STOP DEV UI STACK]"
$(ECHO_PREFIX) printf "Stop the development stack with UI components\n"
$(CMD_PREFIX) podman compose -f ./deploy/compose/dev-single-worker-with-ui.yaml down

.PHONY: redis-stack
redis-stack: ## Run a redis-stack container
$(ECHO_PREFIX) printf " %-12s redis/redis-stack:latest\n" "[PODMAN]"
Expand Down
8 changes: 0 additions & 8 deletions deploy/ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ This playbook installs all the components in the containers.
ansible-playbook -i inventory.txt -e @secrets.enc --ask-vault-pass deploy-bot-stack.yml
```

## Install the UI stack that works with the Bot stack

This playbook installs all the required UI components in the containers.

```console
ansible-playbook -i inventory.txt -e @secrets.enc --ask-vault-pass deploy-ui-stack.yml
```

## Install the Worker stack (first time installation)

This playbook installs all the required component on the host itself
Expand Down
18 changes: 0 additions & 18 deletions deploy/ansible/deploy-ui-stack.yml

This file was deleted.

31 changes: 0 additions & 31 deletions deploy/ansible/ui/tasks/main.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions deploy/compose/dev-single-worker-with-ui.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions docs/dev-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,38 +85,6 @@ To destroy the stack:
make stop-dev
```

## Setup local development deployment with UI components

If you want to deploy the bot with the UI components, you need to do the following steps:

1) Build the ui and apiserver images and set the `/ui/.env`. That .env file will be copied into the container at build time, it needs to be edited before building the image.

```text
IL_UI_ADMIN_USERNAME=<ui-login-username>
IL_UI_ADMIN_PASSWORD=<ui-login-password>
IL_UI_API_SERVER_USERNAME=<api-server-username>
IL_UI_API_SERVER_PASSWORD=<api-server-password>
IL_UI_API_SERVER_URL=http://localhost:3000/jobs # Keep this as is.
```

2) Build the images

```bash
make all-images
```

3) Run the stack

```bash
make run-dev-ui
```

To destroy the stack:

```bash
make stop-dev-ui
```

## Setup testing deployment

We use ansible for deploying this setup on the AWS cloud. To deploy this setup, you will need the following to be present on your local machine:
Expand Down
17 changes: 0 additions & 17 deletions ui/.editorconfig

This file was deleted.

14 changes: 0 additions & 14 deletions ui/.env.example

This file was deleted.

Loading
Loading