diff --git a/app/README.md b/app/README.md index c84687c2949e52adba5a2e73bab1b8c4bd0d0850..9c62883b7d7f3ac785818ee2435b1a499e1d436a 100644 --- a/app/README.md +++ b/app/README.md @@ -49,7 +49,7 @@ Recently policy service was migrated from Flask to FastAPI, this was done in par - `CONTAINER_NAME` - used by Azure to determine which container is used for providing bundle files. Service principal running policy service needs to have write permission to contents in this bucket. - `STORAGE_ACCOUNT` - used by Azure to determine which account is used for providing bundle files. Service principal running policy service needs to have write permission to contents in this bucket. - `ENDPOINT_URL`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` - used by IBM (yes IBM). Please note only region `us-east-1` is currently supported. - - `MINIO_ENDPOINT`, `MINIO_SECRET_KEY`, `MINIO_ACCESS_KEY` - used by Anthos (Reference Architecture). + - `MINIO_ENDPOINT`, `MINIO_SECRET_KEY`, `MINIO_ACCESS_KEY` - used by Baremetal (Reference Architecture). * Limit Number of Groups for Performance Reasons: * The number of groups should be configured to what is necessary. Performance will degrade when there are many groups. This is especially true for translation API which is used by search. Ideally less than 25 groups should be used. However more groups will work, but you may have performance problems as this number of groups grows. At some point the number of groups will break the request payload size however and policy service will return a 413 or 400 error for translate API requests. This configuration error may break search. This can be seen when the number of groups is 1000+. diff --git a/app/bundles/providers/anthos/README.md b/app/bundles/providers/baremetal/README.md similarity index 87% rename from app/bundles/providers/anthos/README.md rename to app/bundles/providers/baremetal/README.md index 765091246e85792b0d09516de29ae4099ad4cab8..b7ffb56984ba91f4808bc18ea36ed5965b293763 100644 --- a/app/bundles/providers/anthos/README.md +++ b/app/bundles/providers/baremetal/README.md @@ -1,4 +1,4 @@ -## Anthos Variables +## Baremetal Variables CLOUD_PROVIDER=anthos diff --git a/app/bundles/providers/anthos/__init__.py b/app/bundles/providers/baremetal/__init__.py similarity index 87% rename from app/bundles/providers/anthos/__init__.py rename to app/bundles/providers/baremetal/__init__.py index ab86bed59058046eeb793d68aa08749a0486592b..b9e067d9f589d80215a490ff7f53f3d77e887682 100644 --- a/app/bundles/providers/anthos/__init__.py +++ b/app/bundles/providers/baremetal/__init__.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -from bundles.providers.anthos.storage import MinIOBundleStorageClient as storage_client +from bundles.providers.baremetal.storage import MinIOBundleStorageClient as storage_client diff --git a/app/bundles/providers/anthos/storage.py b/app/bundles/providers/baremetal/storage.py similarity index 100% rename from app/bundles/providers/anthos/storage.py rename to app/bundles/providers/baremetal/storage.py diff --git a/app/tests/anthos/anthos_jwt_client.py b/app/tests/baremetal/baremetal_jwt_client.py similarity index 100% rename from app/tests/anthos/anthos_jwt_client.py rename to app/tests/baremetal/baremetal_jwt_client.py diff --git a/app/tests/anthos/prepare-dist.sh b/app/tests/baremetal/prepare-dist.sh similarity index 88% rename from app/tests/anthos/prepare-dist.sh rename to app/tests/baremetal/prepare-dist.sh index 868b1c466a913bd9b9af949297154d06b8872ae5..fd57de1ebc30ff308d8a4f0be7a24a12bd8552cf 100644 --- a/app/tests/anthos/prepare-dist.sh +++ b/app/tests/baremetal/prepare-dist.sh @@ -13,5 +13,5 @@ if [ ! -e requirements_dev.txt ]; then #else # cp requirements_dev.txt tests/ibm-test/build-aws/requirements.txt fi -cp -r tests/anthos "${INTEGRATION_TEST_OUTPUT_DIR}" +cp -r tests/baremetal "${INTEGRATION_TEST_OUTPUT_DIR}" cp -r tests/integration "${INTEGRATION_TEST_OUTPUT_DIR}" diff --git a/app/tests/anthos/run-integration-tests.sh b/app/tests/baremetal/run-integration-tests.sh similarity index 85% rename from app/tests/anthos/run-integration-tests.sh rename to app/tests/baremetal/run-integration-tests.sh index b4edf55968b42a2a2434b91f9087526259984cd2..39d09a81f1534b46dd30cf183b5babb5870a69c0 100644 --- a/app/tests/anthos/run-integration-tests.sh +++ b/app/tests/baremetal/run-integration-tests.sh @@ -10,6 +10,6 @@ pip install wheel pytest pytest-cov cd app pip install -r requirements.txt # auth -export BEARER_TOKEN=`python3 tests/anthos/anthos_jwt_client.py` +export BEARER_TOKEN=`python3 tests/baremetal/baremetal_jwt_client.py` # run tests python3 -m pytest --token=$BEARER_TOKEN --service_url=$HOST --data_partition=$DATA_PARTITION diff --git a/devops/gc/pipeline/override-stages.yml b/devops/gc/pipeline/override-stages.yml index a0e3104dfb79d910de65620f70e8aba5ec9ada7b..118724247fdfd0c53ac789c0f1114c0102a3509a 100644 --- a/devops/gc/pipeline/override-stages.yml +++ b/devops/gc/pipeline/override-stages.yml @@ -6,7 +6,7 @@ variables: GC_ENABLE_BOOTSTRAP: "true" GC_INT_TEST_TYPE: python GC_PYTHON_INT_TEST_SUBDIR: "app/tests/gc" - GC_ANTHOS_PYTHON_INT_TEST_SUBDIR: "app/tests/anthos" + GC_BAREMETAL_PYTHON_INT_TEST_SUBDIR: "app/tests/baremetal" # Workaround since tests by default extends .maven. Need it for tests when disabling other CSPs .maven: @@ -32,7 +32,7 @@ gc-dev2-test-python: LEGAL_BASE_URL: $HOST PARTITION_BASE_URL: $HOST -gc-anthos-test-python: +gc-baremetal-test-python: image: gcr.io/google.com/cloudsdktool/cloud-sdk:alpine variables: POLICY_BUCKET: $GC_POLICY_BUCKET diff --git a/docs/docs/install.md b/docs/docs/install.md index 887a5d368769db4551291ba2f51213b07130163d..77efc93b1f89ae6dfb7347ff3fbd18b39a1640ab 100644 --- a/docs/docs/install.md +++ b/docs/docs/install.md @@ -54,7 +54,7 @@ Currently supported values of `CLOUD_PROVIDER`: - `CONTAINER_NAME` - used by Azure to determine which container is used for providing bundle files. Service principal running policy service needs to have write permission to contents in this bucket. - `STORAGE_ACCOUNT` - used by Azure to determine which account is used for providing bundle files. Service principal running policy service needs to have write permission to contents in this bucket. - `ENDPOINT_URL`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` - used by IBM (yes IBM). Please note only region `us-east-1` is currently supported. -- `MINIO_ENDPOINT`, `MINIO_SECRET_KEY`, `MINIO_ACCESS_KEY` - used by Anthos (Reference Architecture). +- `MINIO_ENDPOINT`, `MINIO_SECRET_KEY`, `MINIO_ACCESS_KEY` - used by Baremetal (Reference Architecture). - `DISABLE_OPA_CACHE` - if set OPA caching will be disabled. - `ENABLE_TRANSLATE_PREPROCESSOR` - by default True. If set to false it will revert search translate function to basically pre-M18 translate code. This would require all policies to be in a simple form (for example no deny). Included here for backwards compatibility testing only. It should never be disabled in qualification, preship testing, or production environments. - `ALLOW_FORCE_BOOTSTRAP` - by default True. If set to false it will not allow you to revert bundle to default (if bundle exists). If true, the API will allow update to reset bundle to a known good state (useful for testing or when corrupt/bad rego policy files have been included in the bundle). diff --git a/loadtest/run-load-tests.sh b/loadtest/run-load-tests.sh index acafb882a27ee8b6e42c5d899cdc1cc996c7cbe2..7e3143dfb36923b8ef5a50a3f3af8a62e63101bd 100755 --- a/loadtest/run-load-tests.sh +++ b/loadtest/run-load-tests.sh @@ -26,7 +26,7 @@ elif [ ${CLOUD_PROVIDER} == "azure" ]; then sleep 30 elif [ ${CLOUD_PROVIDER} == "gcp" ]; then export SERVICE_URL=$HOST - export TOKEN=$(python3 ../app/tests/anthos/anthos_jwt_client.py) + export TOKEN=$(python3 ../app/tests/baremetal/baremetal_jwt_client.py) sleep 30 elif [ ${CLOUD_PROVIDER} == "local-gcp" ]; then export DATA_PARTITION=osdu