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

[SC-21322] ACP local development setup. #327

Merged
merged 16 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
58ac8e0
[APPS-4322] ACP local development setup.
pushokwhite May 30, 2022
bf81740
Merge branch 'origin/master:e9ebb666feccae1754792d41e49df3b9f95ef0aa'…
pushokwhite Aug 2, 2022
026315d
Merge remote-tracking branch 'origin/master' into feature/apps-4039/d…
pushokwhite Sep 6, 2022
f827c96
Merge remote-tracking branch 'origin/master' into feature/apps-4039/d…
pushokwhite Sep 9, 2022
01b4bbd
Merge branch 'master' into feature/apps-4039/dev-acp-local-setup
pushokwhite Oct 28, 2022
e61c1bd
Merge remote-tracking branch 'origin/master' into feature/apps-4039/d…
pushokwhite Nov 22, 2022
157de4f
Merge remote-tracking branch 'origin/master' into feature/apps-4039/d…
pushokwhite Dec 20, 2022
96c26ef
Merge remote-tracking branch 'origin/master' into feature/apps-4039/d…
pushokwhite Feb 24, 2023
9058f67
Merge branch 'for-merge' into feature/apps-4039/dev-acp-local-setup
pushokwhite May 30, 2023
3f9826d
Merge branch 'origin/master:437fdadf19b3172998743404f0c98eacfae4f213'…
pushokwhite Jul 25, 2023
5b692bb
Merge branch 'origin/master:6219da778c9c913ec4f646957cea68bc6d6ff270'…
pushokwhite Sep 11, 2023
2b2294d
Merge branch 'origin/master:6a94e22d830f8bb01111326a825b4c12213c6415'…
pushokwhite Jan 22, 2024
5372155
Merge branch 'master' into feature/apps-4039/dev-acp-local-setup
pushokwhite Mar 29, 2024
f09b123
Merge branch 'master' into feature/apps-4039/dev-acp-local-setup
pushokwhite Apr 9, 2024
aaabaa5
Merge branch 'master' into feature/apps-4039/dev-acp-local-setup
pushokwhite Apr 29, 2024
957ae2e
Merge branch 'master' into feature/apps-4039/dev-acp-local-setup
pushokwhite Aug 8, 2024
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
15 changes: 15 additions & 0 deletions generator/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public function setIsActive(bool $isActive): void
$projectData['_requirementAnalyzerData'] = buildDataForRequirementAnalyzer($projectData);
$projectData['secrets'] = buildSecrets($deploymentDir);
$projectData = buildDefaultCredentials($projectData);
$projectData['_isAcpLocalDevelopmentEnabled'] = isAcpLocalDevelopmentEnabled($projectData);

// TODO Make it optional in next major
// Making webdriver as required service for BC reasons
Expand Down Expand Up @@ -1082,6 +1083,20 @@ function isAutoloadCacheEnabled(array $projectData): bool
return $projectData['docker']['cache']['autoload']['enabled'] ?? false;
}

/**
* @param array $projectData
*
* @return bool
*/
function isAcpLocalDevelopmentEnabled(array $projectData): bool
{
if (empty($projectData['image']['environment']['ACP_DOCKER_SDK_FILE'])) {
return false;
}

return true;
}

/**
* @param array $projectData
*
Expand Down
13 changes: 13 additions & 0 deletions generator/src/templates/deploy.bash.twig
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ import service/database/{{ services['database']['engine'] }}.sh
import service/broker/{{ services['broker']['engine'] }}.sh
import service/scheduler/{{ services['scheduler']['engine'] }}.sh

{% if _isAcpLocalDevelopmentEnabled %}
# ACP
[[ -f "{{ image['environment']['ACP_DOCKER_SDK_FILE'] }}" ]] && source "{{ image['environment']['ACP_DOCKER_SDK_FILE'] }}"
alexanderM91 marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}

# Implementation
import sdk/compose.sh
import sdk/data/demo.sh
Expand Down Expand Up @@ -211,6 +216,14 @@ export TIDEWAYS_ENVIRONMENT_NAME=${TIDEWAYS_ENVIRONMENT_NAME}
{# For avoid https://github.com/docker/compose/issues/9104 #}
export DOCKER_COMPOSE_TTY_DISABLED="$(Environment::getDockerComposeTTY)"

{% if _isAcpLocalDevelopmentEnabled %}
# ACP
export ACP_AWS_ENDPOINT={{ image['environment']['AWS_ENDPOINT'] | default('http://localhost:4566') }}
export ACP_AWS_REGION={{ image['environment']['AWS_DEFAULT_REGION'] | default('eu-central-1') }}
export ACP_AWS_ACCESS_KEY_ID={{ image['environment']['AWS_ACCESS_KEY_ID'] | default('test') }}
export ACP_AWS_SECRET_ACCESS_KEY={{ image['environment']['AWS_SECRET_ACCESS_KEY'] | default('test') }}
matweew marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}

Registry::Flow::runBoot

# Running command
Expand Down