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

fix shell scripts and improve K8S steps #15

Merged
merged 3 commits into from
May 28, 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
40 changes: 23 additions & 17 deletions K8S.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,34 @@ This project deploys an AI pipeline with a multipurpose front end for text gener

Get troubleshoot help on the [FAQ](FAQ.md)

## Requirements

You need to be an administrator.

> If not should have enough privileges for OKE, Network, and Database services. Plus others like tenancy inspect. See example:
>
> ```
> Allow group 'Default'/'GroupName' to inspect tenancies in tenancy
> ```

## Set Up environment

On Cloud Shell, clone the repository:

```bash
git clone https://github.com/oracle-devrel/oci-generative-ai-jet-ui.git
```

Change to the new folder:

```bash
cd oci-generative-ai-jet-ui
```

Install Node.js 16 on Cloud Shell.

```bash
nvm install 16 && nvm use 16
nvm install 18 && nvm use 18
```

Install dependencies for scripts.
Expand Down Expand Up @@ -161,19 +183,3 @@ npx zx scripts/clean.mjs
## Local deployment

Run locally with these steps [Local](LOCAL.md)

## Known Issues

Deploying artifacts as Object Storage.

> There is an issue in Terraform `oracle/oci` provider on version `v5.25.0`. It is not updated to the specific version of `terraform-plugin-sdk` that fix the underlying gRCP limit of 4Mb.
>
> The project would want to upload artifacts to Object Storage, like the backend jar file, which is bigger than 4Mb.
>
> ```terraform
> data "local_file" "backend_jar_tgz" {
> filename = "${path.module}/../../.artifacts/backend_jar.tar.gz"
> }
> ```
>
> As a workaround, a `script/deliver.mjs` script and a `script/clean.mjs` script will deliver and clean the artifacts into Object Storage and make Pre-Authenticated Requests available for Terraform resources.
2 changes: 0 additions & 2 deletions scripts/clean.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import Configstore from "configstore";
import clear from "clear";

const shell = process.env.SHELL | "/bin/zsh";
$.shell = shell;
$.verbose = false;

clear();
Expand Down
2 changes: 0 additions & 2 deletions scripts/kustom.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import Mustache from "mustache";
import { getOutputValues } from "./lib/terraform.mjs";
import { exitWithError } from "./lib/utils.mjs";

const shell = process.env.SHELL | "/bin/zsh";
$.shell = shell;
$.verbose = false;

clear();
Expand Down
2 changes: 0 additions & 2 deletions scripts/release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import {
} from "./lib/container.mjs";
import { getOutputValues } from "./lib/terraform.mjs";

const shell = process.env.SHELL | "/bin/zsh";
$.shell = shell;
$.verbose = false;

clear();
Expand Down
2 changes: 0 additions & 2 deletions scripts/setenv.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import {
} from "./lib/oci.mjs";
import { createSSHKeyPair, createSelfSignedCert } from "./lib/crypto.mjs";

const shell = process.env.SHELL | "/bin/zsh";
$.shell = shell;
$.verbose = false;

clear();
Expand Down
2 changes: 0 additions & 2 deletions scripts/tfvars.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import Mustache from "mustache";
import Configstore from "configstore";
import clear from "clear";

const shell = process.env.SHELL | "/bin/zsh";
$.shell = shell;
$.verbose = false;

clear();
Expand Down