Skip to content

Commit f635246

Browse files
committed
Adding license
1 parent 4bbf04a commit f635246

File tree

7 files changed

+49
-23
lines changed

7 files changed

+49
-23
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this
6+
software, associated documentation and/or data (collectively the "Software"), free of charge and under any and
7+
all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor
8+
hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or
9+
(ii) the Larger Works (as defined below), to deal in both
10+
11+
(a) the Software, and
12+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software
13+
(each a “Larger Work” to which the Software is contributed by such licensors),
14+
15+
without restriction, including without limitation the rights to copy, create derivative works of, display,
16+
perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have
17+
sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms.
18+
19+
This license is subject to the following condition:
20+
The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must
21+
be included in all copies or substantial portions of the Software.
22+
23+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
24+
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
26+
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
27+
IN THE SOFTWARE.

feature_store/apigw_terraform/README.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ This module handles opinionated Feature Store AuthN/AuthZ configuration using AP
22

33
## Deploy Using Oracle Resource Manager
44

5-
> ___NOTE:___ If you aren't already signed in, when prompted, enter the tenancy and user credentials. Review and accept the terms and conditions.
5+
> ___NOTE:___ If you aren't already signed in, when prompted, enter the compartment <compartment_name> and user credentials. Review and accept the terms and conditions.
66
7-
1. Click to deploy the stack
7+
1. Click to download the [terraform bundle][https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://raw.githubusercontent.com/harsh97/oci-data-science-ai-samples/feature-store/feature_store/fs_apigw_terraform.zip]
88

9-
[![Deploy to Oracle Cloud][magic_button]][magic_oke_stack]
10-
11-
1. Select the region and compartment where you want to deploy the stack.
9+
1. Create a stack in OCI resource manager with the downloaded bundle
1210

1311
1. Follow the on-screen prompts and instructions to create the stack.
1412

@@ -23,14 +21,16 @@ This module handles opinionated Feature Store AuthN/AuthZ configuration using AP
2321
1. After the stack application is complete attach the auto-provisioned security rules to the respective service and node subnets of the OKE cluster.
2422

2523
### Prerequisites
26-
27-
Create a terraform.tfvars file and populate with the required variables or override existing variables.
28-
29-
Note: An example [tfvars file](examples/terraform.tfvars.example) is included for reference. Using this file is the
30-
preferred way to run the stack from the CLI, because of the large number of variables to manage.
31-
32-
To use this file just copy the example [tfvars file](examples/terraform.tfvars.example) and save it in the outermost directory.
33-
Next, rename the file to __terraform.tfvars__. You can override the example values set in this file.
24+
#### Required permissions:
25+
allow group <user_group> to manage orm-stacks in compartment <compartment_name>
26+
allow group <user_group> to manage orm-jobs in compartment <compartment_name>
27+
allow group <user_group> to read network-load-balancers in compartment <compartment_name>
28+
allow group <user_group> to read instances in compartment <compartment_name>
29+
allow group <user_group> to manage groups in compartment <compartment_name>
30+
allow group <user_group> to manage dynamic-groups in compartment <compartment_name>
31+
allow group <user_group> to manage functions-family in compartment <compartment_name>
32+
allow group <user_group> to manage virtual-network-family in compartment <compartment_name>
33+
allow group <user_group> to manage policies in tenancy
3434

3535

3636
### Running Terraform
@@ -42,11 +42,11 @@ terraform init
4242
```
4343

4444
```bash
45-
terraform plan
45+
terraform plan -var-file=<path-to-variable-file>
4646
```
4747

4848
```bash
49-
terraform apply
49+
terraform apply -var-file=<path-to-variable-file>
5050
```
5151

5252
```bash
@@ -62,5 +62,4 @@ See [LICENSE](./LICENSE) for more details.
6262

6363
[oci]: https://cloud.oracle.com/en_US/cloud-infrastructure
6464
[oci_rm]: https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm
65-
[magic_button]: https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg
66-
[magic_oke_stack]: https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://raw.githubusercontent.com/harsh97/oci-data-science-ai-samples/feature-store/feature_store/fs_apigw_terraform.zip
65+
[stack]: https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://raw.githubusercontent.com/harsh97/oci-data-science-ai-samples/feature-store/feature_store/fs_apigw_terraform.zip

feature_store/apigw_terraform/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ data oci_network_load_balancer_network_load_balancer nlb {
1515
network_load_balancer_id = var.nlb_id
1616
}
1717

18-
module "feature_store_gw_subnet" {
19-
source = "./modules/subnet"
18+
module "feature_store_networking" {
19+
source = "./modules/feature_store_networking"
2020
kubernetes_nlb_id = var.nlb_id
2121
compartment_id = local.compartment_id
2222
subnet_name = "fs-gw-subnet"
@@ -30,7 +30,7 @@ module "function" {
3030
authorized_groups = var.authorized_user_groups
3131
compartment_id = local.compartment_id
3232
ocir_path = var.function_img_ocir_url
33-
subnet_id = module.feature_store_gw_subnet.subnet_id
33+
subnet_id = module.feature_store_networking.subnet_id
3434
name_suffix = random_string.suffix.id
3535
}
3636

@@ -39,7 +39,7 @@ module "api_gw" {
3939
compartment_id = local.compartment_id
4040
function_id = module.function.fn_id
4141
nlb_id = var.nlb_id
42-
subnet_id = module.feature_store_gw_subnet.subnet_id
42+
subnet_id = module.feature_store_networking.subnet_id
4343
}
4444

4545
resource oci_identity_policy feature_store_policies {

feature_store/apigw_terraform/modules/api_gw/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ locals {
66
# we are doing it like this because of issues in escaping ${ character
77
path_str = format("%s%s","$","{request.path[")
88
path_map = {for path,methods in local.unique_paths: path=>replace(replace(tostring(path), "{", local.path_str),"}", "]}")}
9-
policies = ["allow any-user to use functions-family in compartment ${data.oci_identity_compartment.compartment1.name} where ALL {request.principal.type='ApiGateway'}"]
9+
policies = ["allow any-user to use functions-family in compartment ${data.oci_identity_compartment.compartment.name} where ALL {request.principal.type='ApiGateway'}"]
1010

1111
}
1212

13-
data "oci_identity_compartment" "compartment1" {
13+
data "oci_identity_compartment" "compartment" {
1414
id = var.compartment_id
1515
}
1616

feature_store/apigw_terraform/modules/subnet/inputs.tf renamed to feature_store/apigw_terraform/modules/feature_store_networking/inputs.tf

File renamed without changes.

feature_store/apigw_terraform/modules/subnet/main.tf renamed to feature_store/apigw_terraform/modules/feature_store_networking/main.tf

File renamed without changes.

feature_store/apigw_terraform/modules/subnet/outputs.tf renamed to feature_store/apigw_terraform/modules/feature_store_networking/outputs.tf

File renamed without changes.

0 commit comments

Comments
 (0)