Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Add CloudFormation template #119

Merged
merged 10 commits into from
Mar 14, 2022
Merged

Conversation

tshaffe1
Copy link

@tshaffe1 tshaffe1 commented Feb 24, 2022

I wrote a script to do CORTX deployments using CloudFormation for Seagate/cortx#1381. It's basically follows the QSG (with a few tweaks for automated installation). I also wrote a short doc explaining how to use it. This should be a very easy way for new users to get up and running with CORTX+Kubernetes in AWS.


View rendered README.md
View rendered doc/cloudformation.md

Copy link
Contributor

@johnbent johnbent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this would be better as a separate document or as a set of edits to Gregory's original document? @gregnsk

README.md Outdated
@@ -95,6 +95,7 @@ For reference material, we have provided existing Kubernetes deployment models t

1. [Seagate Internal Jenkins Job](http://eos-jenkins.mero.colo.seagate.com/job/Cortx-kubernetes/job/setup-kubernetes-cluster/)
2. [CORTX on AWS and Kubernetes - Quick Install Guide](doc/cortx-aws-k8s-installation.md)
- [AWS CloudFormation Template](doc/cloudformation.md) for this setup
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a separate document, would this be better as a set of edits to the original AWS/k8s guide?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just moved it into the original guide

doc/cortx-aws-k8s-installation.md Outdated Show resolved Hide resolved
@johnbent
Copy link
Contributor

johnbent commented Mar 4, 2022

Yes, I think most user will prefer the simpler way so I would suggest to trim this page as much as possible. @gregnsk , please let us know if you disagree. But otherwise @trshaffer please proceed accordingly. Thanks! Remzi always told me, "You cannot oversimplify something." Which might be ambiguous. But what I think he meant was, "Simpler is always better."

@tshaffe1 tshaffe1 mentioned this pull request Mar 4, 2022
Copy link
Contributor

@osowski osowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a handful of comments that will help to align with concurrent changes, as well as future plans.

In addition to inline comments, in an attempt to not overcomplicate the root k8_cortx_cloud directory, can you move these files to a k8_cortx_cloud/templates/cloudformation subdirectory?

We're looking to condense how many disparate files are initially presented to the user, so being able to structure these changes hierarchically will help as we can use the Cloudformation work as a template for other types of automation templating.

"Default": "v0.0.22"
},

"ImageCORTXControlProv": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The associated "cortx-control-provisoiner" parameter is no longer used in solution.yaml and can be removed.

"Type": "String",
"Default": "ghcr.io/seagate/cortx-all:2.0.0-642-custom-ci"
},
"ImageCORTXDataProv": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The associated "cortx-data-provisoiner" parameter is no longer used in solution.yaml and can be removed.


"yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo",
"yum install -y docker-ce docker-ce-cli containerd.io",
"systemctl start docker",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of k8s 1.24, the dockershim will be removed completely, so we will no longer be able to run docker as the container runtime engine by default for use by k8s without additional configuration and hoop-jumping.

We should switch to only installing containerd and not installing Docker at all, since Docker takes explicit precedence during kubeadm cluster setup. For more details, you can reference https://kubernetes.io/docs/setup/production-environment/container-runtimes/ and https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-runtime

If we have issues with containerd, we can investigate CRI-O instead. But as this effort is meant to simplify the overall installation and we'll be using it for a long time to come, if we can make those changes sooner rather than later, we'll prevent a lot of broken installations as newer k8s versions are released.

{"Fn::Sub": "git clone -b ${VersionDeploymentRepo} https://github.com/Seagate/cortx-k8s.git"},
"mv ./cortx-k8s/k8_cortx_cloud/solution.yaml ./cortx-k8s/k8_cortx_cloud/solution.yaml.orig",
{"Fn::Sub": "./cortx-k8s/k8_cortx_cloud/generate-cvg-yaml.sh --nodes nodes.txt --devices devices.txt --cvgs {} --data {} --solution ./cortx-k8s/k8_cortx_cloud/solution.yaml.orig --datasize ${{DiskSizeMotr}}Gi --metadatasize ${{DiskSizeMotr}}Gi > ./cortx-k8s/k8_cortx_cloud/solution.yaml".format(cvgs, datas)},
"(cd cortx-k8s/k8_cortx_cloud/ && ./prereq-deploy-cortx-cloud.sh /dev/sdb)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of current changes to the prereq script in #144, this now requires a -d flag to be passed in with the device path parameter. The additional flags are not required at this time, but I'll circle back on additional updates that may be wanted here when I complete comprehensive use case documentation this sprint.

This should now be ./prereq-deploy-cortx-cloud.sh -d /dev/sdb

{"Fn::Sub": ' .solution.common.setup_size = "${SetupSize}"'},
{"Fn::Sub": '| .solution.common.storage_sets.durability.sns = "${DurabilitySNS}"'},
{"Fn::Sub": '| .solution.common.storage_sets.durability.dix = "${DurabilityDIX}"'},
{"Fn::Sub": '| .solution.images.cortxcontrolprov = "${ImageCORTXControlProv}"'},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The associated "cortx-control-provisoiner" parameter is no longer used in solution.yaml and can be removed.

"Fn::Sub": "| .solution.images.cortxcontrol = \"${ImageCORTXControl}\""
},
{
"Fn::Sub": "| .solution.images.cortxdataprov = \"${ImageCORTXDataProv}\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The associated "cortx-data-provisioner" parameter is no longer used in solution.yaml and can be removed.

"Fn::Sub": "| .solution.common.storage_sets.durability.dix = \"${DurabilityDIX}\""
},
{
"Fn::Sub": "| .solution.images.cortxcontrolprov = \"${ImageCORTXControlProv}\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The associated "cortx-control-provisioner" parameter is no longer used in solution.yaml and can be removed.

"chmod +x /usr/bin/yq",
"yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo",
"yum install -y docker-ce docker-ce-cli containerd.io",
"systemctl start docker",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above wrt to docker vs containerd.

"Fn::Sub": "| .solution.common.storage_sets.durability.dix = \"${DurabilityDIX}\""
},
{
"Fn::Sub": "| .solution.images.cortxcontrolprov = \"${ImageCORTXControlProv}\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The associated "cortx-control-provisioner" parameter is no longer used in solution.yaml and can be removed.

"Fn::Sub": "| .solution.images.cortxcontrol = \"${ImageCORTXControl}\""
},
{
"Fn::Sub": "| .solution.images.cortxdataprov = \"${ImageCORTXDataProv}\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The associated "cortx-data-provisioner" parameter is no longer used in solution.yaml and can be removed.

Signed-off-by: Tim Shaffer <tim.shaffer@seagate.com>
Signed-off-by: Tim Shaffer <tim.shaffer@seagate.com>
Signed-off-by: Tim Shaffer <tim.shaffer@seagate.com>
Signed-off-by: Tim Shaffer <tim.shaffer@seagate.com>
Signed-off-by: Tim Shaffer <tim.shaffer@seagate.com>
Signed-off-by: Tim Shaffer <tim.shaffer@seagate.com>
Signed-off-by: Tim Shaffer <tim.shaffer@seagate.com>
Signed-off-by: Tim Shaffer <tim.shaffer@seagate.com>
Signed-off-by: Tim Shaffer <tim.shaffer@seagate.com>
Copy link
Contributor

@osowski osowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

I've run multiple successful deployments in us-east-2 and us-west-1 without issue. This should be good to go!

@johnbent johnbent self-requested a review March 14, 2022 16:35
Copy link
Contributor

@johnbent johnbent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My requested changes have been made. LGTM!

@osowski osowski merged commit 861368c into Seagate:integration Mar 14, 2022
@tshaffe1 tshaffe1 deleted the cloudformation branch March 15, 2022 14:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants