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

Revert commit: Support build image in ADC and private networks #6294

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ CHANGELOG

**CHANGES**
- Upgrade Cinc Client to version to 18.4.12 from 18.2.7.
- Allow build-image to be run in an isolated network.

3.9.3
------
Expand Down
11 changes: 10 additions & 1 deletion cli/src/pcluster/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,16 @@ class Operation(Enum):
VERSION = "version"


UNSUPPORTED_OPERATIONS_MAP = {}
UNSUPPORTED_OPERATIONS_MAP = {
Operation.BUILD_IMAGE: ["us-iso"],
Operation.DELETE_IMAGE: ["us-iso"],
Operation.DESCRIBE_IMAGE: ["us-iso"],
Operation.LIST_IMAGES: ["us-iso"],
Operation.EXPORT_IMAGE_LOGS: ["us-iso"],
Operation.GET_IMAGE_LOG_EVENTS: ["us-iso"],
Operation.GET_IMAGE_STACK_EVENTS: ["us-iso"],
Operation.LIST_IMAGE_LOG_STREAMS: ["us-iso"],
}

MAX_TAGS_COUNT = 40 # Tags are limited to 50, reserve some tags for parallelcluster specified tags

Expand Down
21 changes: 5 additions & 16 deletions cli/src/pcluster/resources/imagebuilder/parallelcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ phases:
commands:
- |
set -v
CINC_URL="s3:https://${AWS::Region}-aws-parallelcluster/archives/cinc/cinc-install-1.3.0.sh"
CINC_URL="https:https://${AWS::Region}-aws-parallelcluster.s3.${AWS::Region}.${AWS::URLSuffix}/archives/cinc/cinc-install-1.3.0.sh"
[ -n "${CfnParamCincInstaller}" ] && CINC_URL="${CfnParamCincInstaller}"
echo "${!CINC_URL}"

Expand Down Expand Up @@ -219,19 +219,13 @@ phases:
apt-get -y --only-upgrade install ca-certificates
fi

aws s3 --region ${AWS::Region} cp {{ build.CincUrl.outputs.stdout }} - | bash -s -- -v {{ ChefVersion }}
curl --retry 3 -L {{ build.CincUrl.outputs.stdout }} | bash -s -- -v {{ ChefVersion }}

if [[ -e ${!CA_CERTS_FILE} ]]; then
mkdir -p /opt/cinc/embedded/ssl/certs
ln -sf ${!CA_CERTS_FILE} /opt/cinc/embedded/ssl/certs/cacert.pem
fi

aws s3 cp s3:https://${AWS::Region}-aws-parallelcluster/archives/dependencies/ruby/gems.tgz gems.tgz --region ${AWS::Region}
tar -xf gems.tgz

cd vendor/cache

/opt/cinc/embedded/bin/gem install --local --no-document berkshelf:{{ BerkshelfVersion }}
/opt/cinc/embedded/bin/gem install --no-document berkshelf:{{ BerkshelfVersion }}

# Download and vendor Cookbook
- name: DownloadCookbook
Expand All @@ -241,14 +235,9 @@ phases:
- |
set -v
mkdir -p /etc/chef && sudo chown -R root:root /etc/chef

if [[ "{{ build.CookbookUrl.outputs.stdout }}" =~ "s3:https://" ]]; then
aws s3 cp "{{ build.CookbookUrl.outputs.stdout }}" /etc/chef/aws-parallelcluster-cookbook.tgz --region ${AWS::Region}
else
curl --retry 3 -L -o /etc/chef/aws-parallelcluster-cookbook.tgz "{{ build.CookbookUrl.outputs.stdout }}"
fi
curl --retry 3 -L -o /etc/chef/aws-parallelcluster-cookbook.tgz "{{ build.CookbookUrl.outputs.stdout }}"

mkdir -p /tmp/cookbooks
mkdir /tmp/cookbooks
cd /tmp/cookbooks
tar -xzf /etc/chef/aws-parallelcluster-cookbook.tgz

Expand Down
22 changes: 0 additions & 22 deletions tests/integration-tests/configs/build_image_iso.yaml

This file was deleted.

Loading