HI, Does anyone use devcontainers here? If so are ...
# general
a
HI, Does anyone use devcontainers here? If so are you building your own? The official pulumi/dev-container does not seem to be regularly updated and is currently running v3.102.0 of pulumi cli that does not have features for creating environments by project through cli. Currently I am updating cli through a post-create script but this defeats the purpose in my mind.
s
Hey Kevin. I'll follow up on this - the employee who created the devcontainer is no longer with the company and I have to determine which team should take over ownership.
@ambitious-policeman-72992 Just to clarify, you mean https://github.com/pulumi/devcontainer?
Ok, so we have archived
pulumi/devcontainer
. I haven't used them extensively, but my understanding is that devcontainers are specific to the repo in which they are contained. We have officially supported Docker images that you can find here: https://hub.docker.com/u/pulumi I recommend that you use the
pulumi-$LANGUAGE
image instead of
pulumi/pulumi
. The latter has all languages and common tools like the AWS CLI, but it's gigantic: 2.6 GB. Better to start with e.g.
pulumi-python
and install what you need on top of that. If you need prior art for a devcontainer, I have a TODO on my list to add one to https://github.com/pulumi/foundational-training I can move this up in priority if it would also be helpful to you - let me know.
If you're using another repo that you feel is missing a devcontainer, please file an issue and/or ping me here and I'll try to move it along.
a
@stocky-restaurant-98004 Looks like it was just archived today. 🙂 It's a shame as this container was pretty solid with the exception of older version of tools. I did some initial testing to target pulumi/pulumi and had a few challenges. I will see if I can spend some time on it. It would definitely be helpful as it helps streamline the developer experience. We include environments files that will setup AWS creds by env or credentials, Pulumi Tokens, and private npm credentials so that the only thing someone needs to get started is basic setup. If I make progress I will certainly let you know.
s
ESC would be tremendously helpful in automating those AWS credentials and environment setup - that's precisely what it's designed to do!
a
@stocky-restaurant-98004 ESC is great for when we have code ready to ship. It is falling flat when it comes to local development. At least maybe in our workflows. We use SAML credentials to identify the developer that is building in sandbox/lab accounts. These autotag assets so we know who built it. Not sure we would be able to do the same thing with ESC. Also isn't ESC a chicken and egg situation? I need Pulumi tokens to get to environments. These would need to be injected somehow into dev containers.
a
@ambitious-policeman-72992 Where you able to build a devcontainer based on one of the supported base images? I'm struggling with it.
a
@average-megabyte-57483 I was able to do it.
We have been a bit torn on which base image. Right now I am using pulumi/pulumi-base and adding the packages that we need.
a
Thanks for getting back to me. Would you be able to share it?
Ahhh... that makes sense
I was using a devcontainer base image
a
We got that one working as well.
a
sweet
a
But since we are looking to use pulumi deployments we figure that it's better to use the pulumi images as they seem to be cached so it speeds up our deployment time as we are looking to use our own custom devcontainer to deploy through our entire pipeline.
What IDE are you using?
a
vscode
a
Most of our repos are private but there is not much in the devcontainer configurations that are custom to us.
a
gotcha
a
I would need to figure out a way to share them with you.
a
Anything you can share might inspire me
a
Ok give me a few minutes we have an OSS github org that I can possibly push to. Is there any particular language for SDK . Right now we are using Typescript but the devcontainer is multiple language support.
a
I use the python one
a
@average-megabyte-57483 Sorry for late response I got side tracked with a few thing.
That is the location of my sample devcontainers.
Most of these were tested on MAC and Windows. Let me know if you have questions.
a
Thanks @ambitious-policeman-72992 for your effort