Skip to content

Commit

Permalink
Merge pull request #15 from oracle-devrel/fix-shell-issue
Browse files Browse the repository at this point in the history
fix shell scripts and improve K8S steps
  • Loading branch information
WSPluta authored May 28, 2024
2 parents a534e6e + ed40581 commit f5b7bcc
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 27 deletions.
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

0 comments on commit f5b7bcc

Please sign in to comment.