#refarch (2024-10)

Cloud Posse Reference Architecture

2024-10-03

Igor M avatar

Do you recommend using Helmfile via ArgoCD for app deployments to EKS? Are there advantages to this approach rather than using Kustomize? (It it that it’s easier to spin up preview environments via Helmfile?)

Gabriela Campana (Cloud Posse) avatar
Gabriela Campana (Cloud Posse)

@Dan Miller (Cloud Posse) @Yonatan Koren

Dan Miller (Cloud Posse) avatar
Dan Miller (Cloud Posse)

We use ArgoCD or helm deploy directly, both with helmfile. Although @Igor Rodionov would have to weigh in on the advantages of that decision

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

I would pick what makes the most sense to your engineering team. Kustomize is nice, but we’ve been using helmfile for so long that we tend to stick with it.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

I think we should revisit this next year

Igor M avatar

Helmfile seems like it’s worth trying out to compare against. I might have a use case for some environments where Argo is not available (and doesn’t require frequent CD) and using Atmos to deploy to those environments might be a nice alternative.

Igor M avatar

I like the idea of a monochart that you guys developed, but it feels like it’s not being maintained for things like Istio https://github.com/cloudposse/charts/tree/master/incubator/monochart. Is there an open-source alternative that you’re aware of? Or is there a desire to maintain this one?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

I’ve changed tact on monochart. We still standby the pattern, but instead of us managing it, we instruct customers how to create their own monochart for their organization

1
Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

When we managed it, what ended up happening is we were reinventing the k8s spec after adding support for everything. Because in the end, different companies use different parts. That lead to an unwieldy chart to manage, and was antithetical to what we were trying to achieve.

1
Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

The idea is that each org should define an “interface” for their apps on k8s. That interface is defined via helm charts that can be reused by teams in the org to deploy services in an idiomatic way. Don’t expose every feature of k8s, instead the one you will need.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

So in your case, with istio, we have a customer doing exactly this. They have a custom “monochart” (e.g. “acme-service”), which implements all the custom resources for istio the way they need it. Then any developer can deploy their service using that chart. Just bring-your-own-dockerfile.

1
Igor M avatar

Thanks Erik. I’ll give this a try and see how it stacks up against plain kustomize

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

since kustomize can deploy helm charts, I think this might be the best of both?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

(that’s coming from the POV though of a helm advocate, and I’m sure many users of kustomize would disagree)

2024-10-04

2024-10-10

github3 avatar
github3
11:30:38 PM

I am currently going through the quick start and I have just deployed the accounts successfully via atmos workflow deploy/accounts -f accounts and I have run atmos terraform apply account-map -s core-gbl-root to build the account maps.

But when I run atmos workflow deploy/account-settings -f accounts I get the following error:

`Planning failed. Terraform encountered an error while generating this plan.


│ Error: Invalid index

│ on ../account-map/modules/iam-roles/main.tf line 46, in locals:
│ 46: is_root_user = local.current_identity_account == local.account_map.full_account_map[local.root_account_name]
│ ├────────────────
│ │ local.account_map.full_account_map is object with 12 attributes
│ │ local.root_account_name is “core-root”

│ The given key does not identify an element in this collection value.`

Checking the account map I see the line: root_account_account_name = "core-root" so it doesn’t look like a object with attributes. What are some suggested steps to troubleshoot this?

1

2024-10-11

Shirisha Sudhakar Rao avatar
Shirisha Sudhakar Rao

@Andriy Knysh (Cloud Posse)

I have used the reference architecture to setup a transit gateway to connect 2 VPCs in different accounts. However, I am having trouble understanding how the transit gateway offers a connection to the internet. Is that not a part of the reference architecture and is something we should setup separately on our own? If so, how can this be achieved?

There is a line in the reference architecture VPC section that states this

# Use PrivateLink in private-only VPCs at least until we have
# a connection to the internet via Transit Gateway.

So ideally, transit gateway setup should provide connection to the internet right?

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

there are many diff considerations here (e.g. VPC private vs public subnets, etc.). I’m in meetings now, will try to explain later (ping me in a few hours )

Shirisha Sudhakar Rao avatar
Shirisha Sudhakar Rao

@Andriy Knysh (Cloud Posse) Ok, sure

Shirisha Sudhakar Rao avatar
Shirisha Sudhakar Rao

@Andriy Knysh (Cloud Posse) Pinging you again as a reminder

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

@Shirisha Sudhakar Rao it all depends on your network architecture and the security nd monitoring requirements. You can have many different variations of network architecture, I’ll give you a few examples here:

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

• If the VPCs in the two accounts have public subnets, they already have egress to the Internet via the IGW

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

• If the VPCs only have private subnets, then you need to provide Internet access using any of the following:

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

– You can connect a Site-to_site VPN to the TGW on one side, and then add VPC attachments for the VPC on the other side of the TGW. This way, the VPN connection will provide access to the Internet. In the VPC route tables, you will have a route 0.0.0.0/0 pointing to the TGW. In the TGW route table, you will have a route 0.0.0.0/0 pointing to the VPN connection

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

– You can have a separate VPC (in the same or separate account, we’ll call it network). The network VPC has public subnets with a Internet Gateway (providing connection to the Internet). The VPCs in both accounts can only have private subnets. They will be connected to the Internet via the TGW and the network VPC. In this case, you will have a subnet route in each VPC 0.0.0.0/0 pointing to the TGW. In the TGW route table, you will have a route 0.0.0.0/0 pointing to the VPC attachment of the network VPC. In the network VPC, you will have a route 0.0.0.0/0 pinting to the IGW (Internet Gateway)

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

I suppose your question was about the last part - a network VPC with Internet access via IGW, and the other VPCs connected to the TGW and then to the network VPC

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

regarding this

# Use PrivateLink in private-only VPCs at least until we have
# a connection to the internet via Transit Gateway.
Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

if both VPC are private (no public subnets), then you can use a Private Link to another VPC (e.g. network in our example), which has connection to the Internet via IGW

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

in all of these cases, if both VPCs are private, then you have to provide a connection to something that has Internet access

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

that something can be another VPC (network), and you connect the 2 VPCs to the network VPC using a Private Link, or a Transit Gateway

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

the TGW itself does not offer nor provide connections to the Internet, it’s just a proxy. You need to connect it to a VPC which has connection to the Internet, or to a on-site VPN (this is more complicated since it involves using on-prem equipment like Palo Alto or Cisco)

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

there are many different variations of the network architecture. Let me know if the above description answers your question, or you need ore help

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

the Cloud Posse tgw components https://github.com/cloudposse/terraform-aws-components/tree/main/modules/tgw describes the architecture where you have private VPCs in multiple accounts and also a network VPC (e.g. in a network account) which has public subnets and connection to the Internet via IGW

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

it’s impossible to configure all possible variations of network architectures with one terraform module. If your use case differs from the above, you will have to make adjustments in your own code

    keyboard_arrow_up