Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:imperva/dsfkit into set_custom_base_…
Browse files Browse the repository at this point in the history
…directory
  • Loading branch information
assaf13 committed Oct 15, 2023
2 parents 9d58c03 + 66f1c64 commit 1abfe5e
Show file tree
Hide file tree
Showing 52 changed files with 257 additions and 197 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,23 @@ jobs:
terraform_wrapper: false
terraform_version: ~1.6.0

- name: Format version for zip file name
run: |
version="${{ github.event.inputs.future_release }}"
formatted_version=${version//./_}
echo "FORMATTED_VERSION=$formatted_version" >> $GITHUB_OUTPUT
id: format-version

- name: Update modules' versions in examples
run: |
find ./examples/ -type f -exec sed -i 's;.*latest release tag.*;version="'${{ github.event.inputs.future_release }}'" # latest release tag;' {} \;
- name: Update READMEs
run: |
echo "Formatted version: ${{ steps.format-version.outputs.FORMATTED_VERSION }}"
find . -type f -name 'README.md' -exec sed -E -i 's;github.com/imperva/dsfkit/tree/([0-9]*\.){2}[0-9]*;github.com/imperva/dsfkit/tree/'${{ github.event.inputs.future_release }}';g' {} \;
find . -type f -name 'README.md' -exec sed -E -i 's;github.com/imperva/dsfkit/raw/([0-9]*\.){2}[0-9]*;github.com/imperva/dsfkit/raw/'${{ github.event.inputs.future_release }}';g' {} \;
find . -type f -name 'README.md' -exec sed -E -i '/\/examples\// s;([0-9]+_){2}[0-9]+\.zip;${{ steps.format-version.outputs.FORMATTED_VERSION }}\.zip;g' {} \;
- name: Update installer machine link
run: |
Expand All @@ -90,16 +99,8 @@ jobs:
run: |
terraform fmt -recursive
- name: Format version for zip file name
run: |
version="${{ github.event.inputs.future_release }}"
formatted_version=${version//./_}
echo "FORMATTED_VERSION=$formatted_version" >> $GITHUB_OUTPUT
id: format-version

- name: Zip per examples
run: |
echo "Formatted version: ${{ steps.format-version.outputs.FORMATTED_VERSION }}"
for d in $(find ./examples -type d -links 2); do _d=$(dirname ${d}); _b=$(basename ${d}); pushd $_d; zip -FSr ${_b}/${_b}_${{ steps.format-version.outputs.FORMATTED_VERSION }}.zip ${_b} -x "*.zip"; popd; done
- name: Zip Sonar python upgrader
Expand Down Expand Up @@ -130,7 +131,7 @@ jobs:
with:
fetch-depth: 0
ref: ${{ env.dst_branch }}
token: ${{ secrets.PUSH_TO_OTHER_REPOS_TOKEN }}
token: ${{ secrets.PUSH_TO_OTHER_REPOS_TOKEN_ADMIN }}

- name: Merge
run: |
Expand Down Expand Up @@ -162,7 +163,7 @@ jobs:
needs: tag_branch
uses: ./.github/workflows/deploy_module.yml
secrets:
PUSH_TO_OTHER_REPOS_TOKEN: ${{ secrets.PUSH_TO_OTHER_REPOS_TOKEN }}
PUSH_TO_OTHER_REPOS_TOKEN_ADMIN: ${{ secrets.PUSH_TO_OTHER_REPOS_TOKEN_ADMIN }}

test_plan:
needs: deploy_modules
Expand Down
60 changes: 35 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ This guide references the following information and links, some of which are ava
</td>
</tr>
<tr>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5">eDSF Kit GitHub Repository</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6">eDSF Kit GitHub Repository</a>
</td>
<td>
</td>
Expand Down Expand Up @@ -395,7 +395,7 @@ The following table lists the released eDSF Kit versions, their release date and
</td>
</tr>
<tr>
<td>Coming soon
<td>15 Oct 2023
</td>
<td>1.5.6
</td>
Expand Down Expand Up @@ -447,7 +447,7 @@ e.g., with or without DRA, the number of Agentless Gateways, with or without HAD
We provide several of out-of-the-box Terraform recipes we call "examples" which are already configured to deploy common DSF environments.
You can use the example as is, or customize it to accommodate your deployment requirements.
These examples can be found in the <a href="https://github.com/imperva/dsfkit/tree/1.5.5">eDSF Kit GitHub Repository</a> under the <a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples">examples</a> directory.
These examples can be found in the <a href="https://github.com/imperva/dsfkit/tree/1.5.6">eDSF Kit GitHub Repository</a> under the <a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples">examples</a> directory.
Some examples are intended for Lab or POC and others for actual DSF deployments by Professional Services and customers.
For more details about each example, click on the example name.
Expand All @@ -464,63 +464,73 @@ For more details about each example, click on the example name.
</td>
</tr>
<tr>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/poc/sonar_basic_deployment/README.md">Sonar Basic Deployment</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_basic_deployment/README.md">Sonar Basic Deployment</a>
</td>
<td>Lab/POC
</td>
<td>A DSF deployment with a DSF Hub, an Agentless Gateway, federation, networking and onboarding of a MySQL DB.
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/poc/sonar_basic_deployment/sonar_basic_deployment.zip">sonar_basic_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_basic_deployment/sonar_basic_deployment_1_5_6.zip">sonar_basic_deployment_1_5_6.zip</a>
</td>
</tr>
<tr>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/poc/sonar_hadr_deployment/README.md">Sonar HADR Deployment</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_hadr_deployment/README.md">Sonar HADR Deployment</a>
</td>
<td>Lab/POC
</td>
<td>A DSF deployment with a DSF Hub, an Agentless Gateway, DSF Hub and Agentless Gateway HADR, federation, networking and onboarding of a MySQL DB.
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/poc/sonar_hadr_deployment/sonar_hadr_deployment.zip">sonar_hadr_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_hadr_deployment/sonar_hadr_deployment_1_5_6.zip">sonar_hadr_deployment_1_5_6.zip</a>
</td>
</tr>
<tr>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/installation/sonar_single_account_deployment/README.md">Sonar Single Account Deployment</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/sonar_single_account_deployment/README.md">Sonar Single Account Deployment</a>
</td>
<td>PS/Customer
</td>
<td>A DSF deployment with a DSF Hub HADR, an Agentless Gateway and federation. The DSF nodes (Hubs and Agentless Gateway) are in the same AWS account and the same region. It is mandatory to provide as input to this example the subnets to deploy the DSF nodes on.
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/installation/sonar_single_account_deployment/sonar_single_account_deployment.zip">sonar_single_account_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/sonar_single_account_deployment/sonar_single_account_deployment_1_5_6.zip">sonar_single_account_deployment_1_5_6.zip</a>
</td>
</tr>
<tr>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/installation/sonar_multi_account_deployment/README.md">Sonar Multi Account Deployment</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/sonar_multi_account_deployment/README.md">Sonar Multi Account Deployment</a>
</td>
<td>PS/Customer
</td>
<td>A DSF deployment with a DSF Hub, an Agentless Gateway and federation. The DSF nodes (Hub and Agentless Gateway) are in different AWS accounts. It is mandatory to provide as input to this example the subnets to deploy the DSF nodes on.
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/installation/sonar_multi_account_deployment/sonar_multi_account_deployment.zip">sonar_multi_account_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/sonar_multi_account_deployment/sonar_multi_account_deployment_1_5_6.zip">sonar_multi_account_deployment_1_5_6.zip</a>
</td>
</tr>
<tr>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/poc/dsf_deployment/README.md">DSF Deployment</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/dsf_deployment/README.md">DSF Deployment</a>
</td>
<td>Lab/POC
</td>
<td>A full DSF deployment with DSF Hub and Agentless Gateways (formerly Sonar), DAM (MX and Agent Gateways), DRA (Admin and DRA Analytics), and Agent and Agentless audit sources.
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/poc/dsf_deployment/dsf_deployment.zip">dsf_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/dsf_deployment/dsf_deployment_1_5_6.zip">dsf_deployment_1_5_6.zip</a>
</td>
</tr>
<tr>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/installation/dsf_single_account_deployment/README.md">DSF Single Account Deployment</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/dsf_single_account_deployment/README.md">DSF Single Account Deployment</a>
</td>
<td>PS/Customer
</td>
<td>A full DSF deployment with DSF Hub and Agentless Gateways (formerly Sonar), DAM (MX and Agent Gateways) and DRA (Admin and DRA Analytics).
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/installation/dsf_single_account_deployment/dsf_single_account_deployment.zip">dsf_single_account_deployment.zip</a>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/dsf_single_account_deployment/dsf_single_account_deployment_1_5_6.zip">dsf_single_account_deployment_1_5_6.zip</a>
</td>
</tr>
<tr>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/sonar_upgrade/README.md">Sonar Upgrade (Alpha)</a>
</td>
<td>All
</td>
<td>Upgrade of DSF Hub and Agentless Gateway (formerly Sonar).
</td>
<td><a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/sonar_upgrade/sonar_upgrade_1_5_6.zip">sonar_upgrade_1_5_6.zip</a>
</td>
</tr>
</table>
Expand Down Expand Up @@ -598,7 +608,7 @@ The first thing to do in this deployment mode is to [download Terraform ](https:
**NOTE:** Update the values for the required parameters to complete the installation: example_name, aws_access_key_id, aws_secret_access_key and region
1. Download the zip file of the example you've chosen (See the [Choosing the Example/Recipe that Fits Your Use Case](#choosing-the-examplerecipe-that-fits-your-use-case) section) from the <a href="https://github.com/imperva/dsfkit/tree/1.5.5">eDSF Kit GitHub Repository</a>, e.g., if you choose the "sonar_basic_deployment" example, you should download <a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/poc/sonar_basic_deployment/sonar_basic_deployment.zip">sonar_basic_deployment.zip</a>.
1. Download the zip file of the example you've chosen (See the [Choosing the Example/Recipe that Fits Your Use Case](#choosing-the-examplerecipe-that-fits-your-use-case) section) from the <a href="https://github.com/imperva/dsfkit/tree/1.5.6">eDSF Kit GitHub Repository</a>, e.g., if you choose the "sonar_basic_deployment" example, you should download <a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_basic_deployment/sonar_basic_deployment.zip">sonar_basic_deployment.zip</a>.
2. Unzip the zip file in CLI or using your operating system's UI.
For example, in CLI:
Expand Down Expand Up @@ -686,7 +696,7 @@ This mode is similar to the CLI mode except that the Terraform is run on an EC2
7. Expand the “Advanced details” panel:<br>![Advanced details](https://user-images.githubusercontent.com/87799317/203825918-31879c4b-ca61-48e3-a522-c325335c4419.png)
8. Copy and paste the contents of this [bash script](https://github.com/imperva/dsfkit/blob/1.5.5/installer_machine/installer_machine_user_data.sh) into the [User data](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) textbox.<br>![User data](https://user-images.githubusercontent.com/87799317/203826003-661c829f-d704-43c4-adb7-854b8008577c.png)
8. Copy and paste the contents of this [bash script](https://github.com/imperva/dsfkit/blob/1.5.6/installer_machine/installer_machine_user_data.sh) into the [User data](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) textbox.<br>![User data](https://user-images.githubusercontent.com/87799317/203826003-661c829f-d704-43c4-adb7-854b8008577c.png)
9. Click on **Launch Instance**. At this stage, the installer machine is initializing and downloading the necessary dependencies.
Expand All @@ -705,30 +715,30 @@ This mode is similar to the CLI mode except that the Terraform is run on an EC2
For example: `chmode 400 a_key_pair.pem`
11. Download the zip file of the example you've chosen (See the [Choosing the Example/Recipe that Fits Your Use Case](#choosing-the-examplerecipe-that-fits-your-use-case) section) from the <a href="https://github.com/imperva/dsfkit/tree/1.5.5">eDSF Kit GitHub Repository</a>, e.g., if you choose the "sonar_basic_deployment" example, you should download <a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/poc/sonar_basic_deployment/sonar_basic_deployment.zip">sonar_basic_deployment.zip</a>.
11. Download the zip file of the example you've chosen (See the [Choosing the Example/Recipe that Fits Your Use Case](#choosing-the-examplerecipe-that-fits-your-use-case) section) from the <a href="https://github.com/imperva/dsfkit/tree/1.5.6">eDSF Kit GitHub Repository</a>, e.g., if you choose the "sonar_basic_deployment" example, you should download <a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/poc/sonar_basic_deployment/sonar_basic_deployment.zip">sonar_basic_deployment.zip</a>.
Run:
```bash
wget https://github.com/imperva/dsfkit/raw/1.5.5/examples/poc/sonar_basic_deployment/sonar_basic_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/poc/sonar_basic_deployment/sonar_basic_deployment_1_5_6.zip
or
wget https://github.com/imperva/dsfkit/raw/1.5.5/examples/poc/sonar_hadr_deployment/sonar_hadr_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/poc/sonar_hadr_deployment/sonar_hadr_deployment_1_5_6.zip
or
wget https://github.com/imperva/dsfkit/raw/1.5.5/examples/installation/sonar_single_account_deployment/sonar_single_account_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/installation/sonar_single_account_deployment/sonar_single_account_deployment_1_5_6.zip
or
wget https://github.com/imperva/dsfkit/raw/1.5.5/examples/installation/sonar_multi_account_deployment/sonar_multi_account_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/installation/sonar_multi_account_deployment/sonar_multi_account_deployment_1_5_6.zip
or
wget https://github.com/imperva/dsfkit/raw/1.5.5/examples/poc/dsf_deployment/dsf_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/poc/dsf_deployment/dsf_deployment_1_5_6.zip
or
wget https://github.com/imperva/dsfkit/raw/1.5.5/examples/installation/dsf_single_account_deployment/dsf_single_account_deployment.zip
wget https://github.com/imperva/dsfkit/raw/1.5.6/examples/installation/dsf_single_account_deployment/dsf_single_account_deployment_1_5_6.zip
```
12. Continue by following the [CLI Deployment Mode](#cli-deployment-mode) beginning at step 2.
Expand Down Expand Up @@ -951,7 +961,7 @@ In case of failure, the Terraform may have deployed some resources before failin
Information about additional topics can be found in specific examples' READMEs, when relevant.
For example: <a href="https://github.com/imperva/dsfkit/tree/1.5.5/examples/installation/sonar_single_account_deployment/README.md">Sonar Single Account Deployment</a>
For example: <a href="https://github.com/imperva/dsfkit/tree/1.5.6/examples/installation/sonar_single_account_deployment/README.md">Sonar Single Account Deployment</a>
These topics include:
- Storing Terraform state in S3 bucket
Expand Down
Binary file removed examples/azure/dsf_deployment/dsf_deployment.zip
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/azure/dsf_deployment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ provider "azurerm" {

module "globals" {
source = "imperva/dsf-globals/azurerm"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag

}

Expand Down
14 changes: 7 additions & 7 deletions examples/azure/dsf_deployment/sonar.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ locals {

module "hub_main" {
source = "imperva/dsf-hub/azurerm"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = var.enable_sonar ? 1 : 0

friendly_name = join("-", [local.deployment_name_salted, "hub"])
Expand Down Expand Up @@ -34,7 +34,7 @@ module "hub_main" {

module "hub_dr" {
source = "imperva/dsf-hub/azurerm"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = var.enable_sonar && var.hub_hadr ? 1 : 0

friendly_name = join("-", [local.deployment_name_salted, "hub", "DR"])
Expand Down Expand Up @@ -66,7 +66,7 @@ module "hub_dr" {

module "hub_hadr" {
source = "imperva/dsf-hadr/null"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = length(module.hub_dr) > 0 ? 1 : 0

sonar_version = var.sonar_version
Expand All @@ -84,7 +84,7 @@ module "hub_hadr" {

module "agentless_gw_main" {
source = "imperva/dsf-agentless-gw/azurerm"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = local.agentless_gw_count

friendly_name = join("-", [local.deployment_name_salted, "agentless", "gw", count.index])
Expand Down Expand Up @@ -115,7 +115,7 @@ module "agentless_gw_main" {

module "agentless_gw_dr" {
source = "imperva/dsf-agentless-gw/azurerm"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = var.agentless_gw_hadr ? local.agentless_gw_count : 0

friendly_name = join("-", [local.deployment_name_salted, "agentless", "gw", count.index, "DR"])
Expand Down Expand Up @@ -149,7 +149,7 @@ module "agentless_gw_dr" {

module "agentless_gw_hadr" {
source = "imperva/dsf-hadr/null"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = length(module.agentless_gw_dr)

sonar_version = var.sonar_version
Expand Down Expand Up @@ -193,7 +193,7 @@ locals {

module "federation" {
source = "imperva/dsf-federation/null"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
for_each = local.hub_gw_combinations

hub_info = {
Expand Down
6 changes: 3 additions & 3 deletions examples/installation/dsf_single_account_deployment/dam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ locals {

module "mx" {
source = "imperva/dsf-mx/aws"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = var.enable_dam ? 1 : 0

friendly_name = join("-", [local.deployment_name_salted, "mx"])
Expand Down Expand Up @@ -37,7 +37,7 @@ module "mx" {

module "agent_gw" {
source = "imperva/dsf-agent-gw/aws"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = local.agent_gw_count

friendly_name = join("-", [local.deployment_name_salted, "agent", "gw", count.index])
Expand Down Expand Up @@ -66,7 +66,7 @@ module "agent_gw" {

module "agent_gw_cluster_setup" {
source = "imperva/dsf-agent-gw-cluster-setup/null"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = local.create_agent_gw_cluster

cluster_name = var.cluster_name != null ? var.cluster_name : join("-", [local.deployment_name_salted, "agent", "gw", "cluster"])
Expand Down
4 changes: 2 additions & 2 deletions examples/installation/dsf_single_account_deployment/dra.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ locals {

module "dra_admin" {
source = "imperva/dsf-dra-admin/aws"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = var.enable_dra ? 1 : 0

friendly_name = join("-", [local.deployment_name_salted, "dra", "admin"])
Expand All @@ -27,7 +27,7 @@ module "dra_admin" {

module "dra_analytics" {
source = "imperva/dsf-dra-analytics/aws"
version = "1.5.5" # latest release tag
version = "1.5.6" # latest release tag
count = local.dra_analytics_count

friendly_name = join("-", [local.deployment_name_salted, "dra", "analytics", count.index])
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 1abfe5e

Please sign in to comment.