Infrastructure as code configuration
- Install
pulumibinary withcurl -fsSL https://get.pulumi.com/ | sh - Run
pulumi new. Log in via browser and choose a template. I started withgithub-python. - Follow the wizard steps.
After the step-by-step setup, I noticed a couple things that felt unusual in a conda context:
pulumihandles its ownvenvwhen you choose a Python template. It will symlink to the currentpythoninPATH. Instead, we have chosen to bootstrap the environment withpixiso a random interpreter is not chosen on initialization. You just need to runpixi install. We have adjusted theruntime.options.virtualenvpath inPulumi.yamlaccordingly. You can also change this to a given conda environment if you want, but I'm not sure if one can use env vars here.- The Pulumi "programs" (e.g.
__main__.py) are located in the repository root by default. I think it's tidier to have them under a subdirectory likesrc/. This was adjusted inPulumi.yamlby changing the value ofmain.
I think Pulumi will still write to
requirements.txthere and there, so we have to find a way of keepingpixi.tomlin sync to benefit from the lockfiles.
Once there we can start importing repositories, teams and other github resources
We need
pulumi-githubin the virtual environment. This should have been added by thepulumi newcommand already.
This follows https://www.pulumi.com/blog/managing-github-with-pulumi/ with some changes.