Hey! Thank you guys for the work you do with Pulum...
# contribute
w
Hey! Thank you guys for the work you do with Pulumi, I’m really enjoying working with it. I’m trying to generate a provider for Rundeck, and I had a question. I’m following this (the pulumi-tf-provider-boilerplate). I’m especially confused about the plugin (perhaps because publishing an NPM library on a private registry is something we do all the time. Moving forward with the plugin isn’t super clear). The
make build_sdks
command generates an npm library and a binary plugin. I can see the plugin:
Copy code
$ pulumi plugin ls | grep rundeck
rundeck     resource  0.2.0                            40 MB   2 weeks ago    2 weeks ago
But now — how do I actually get this deployed somewhere so that it’s usable in a production environment? Here’s my fork of the
pulumi-tf-provider-boilerplate
, after having followed all the steps. Any ideas?
b
Hi @worried-honey-61577 I am looking at your provider right now
w
Thanks Paul!
b
so just to clarify you are fine with the npm publish part right?
w
Yep. It’s getting the library to install the plugin part that confuses me. Like where is the plugin deployed to? Is there some registry for it? How does the library know which plugins to install?
b
You could grab the build scripts that @billowy-army-68599 added to the pulumi-scaleway repo As you can see, that provider just pushes to the github package repo
pulumi plugin install resource scaleway --server-url https://github-package-location will be able to take the tar.gz created
@billowy-army-68599 we should probably record some videos on this to make this easier for people...
w
Mmmm ok that makes a bit more sense! Let me take a look at that Also I’m happy to be the guinea pig and help you guys write any documentation on this
I’m assuming you’re talking about this build script
So you upload it to some storage bucket, and then run
Copy code
pulumi plugin install resource <name> --server-url <location-of-storage-bucket>
? How does that occur upon the installation of an NPM library, like if I were to
Copy code
npm install @pulumi/gcp
b
hey, just catching up! my provider is here: https://github.com/jaxxstorm/pulumi-scaleway
w
Op, had the wrong build script 😅
b
so what happens is, when we build our SDKs, we inject this file: https://github.com/pulumi/scripts/blob/master/ci/install-pulumi-plugin.js into the packaged SDK, It doesn't happen inside the repo, it happens at build time
I never got round to implementing automatic plugin acquisition for scaleway and rke, but if you want to do it, you'll need to add
install-pulumi-plugin.js
with a
--server
option
w
Ok, that makes sense. What specific server is it? Is it storage bucket you self-host? I’ve seen this a few times now
<s3://rel.pulumi.com/releases/plugins/${PLUGIN_PACKAGE_NAME}>
b
you can probably remove a lot of this and do it in the make target with
jq
Copy code
jq '.scripts.postinstall += "pulumi plugin install resource rundeck $(PROVIDER_VERSION) --server <https://bintray.com/pulumi-resource-rundeck>"' > package.json
I personally upload all my releases to bintray and then set this param https://github.com/jaxxstorm/pulumi-scaleway/blob/master/provider/resources.go#L84
<http://rel.pulumi.com|rel.pulumi.com>
is the default for pulumi owned plugins
w
Ahhhhh ok. Yeah we use Artifactory, so something private like that would be ideal for us
plus this
this’ll be fairly alpha-stage haha
b
you just need a http server to upload them to, artifactory would work, or just your own s3 bucket as well
w
Ok that’s awesome. Thank you guys so much! I’m sure I’ll be back with more questions later 🙂