Hey all! I'm trying to use the official Pulumi git...
# general
d
Hey all! I'm trying to use the official Pulumi github action from here but it seems like the action is built with a known EKS authentication bug because it's using a very old version of kubectl that hasn't been updated for 8 months or so... is this on the docket to get squared away? I cannot use the Pulumi github action until then 😐
b
@damp-room-84921 - the pulumi github action is a typescript action, are you still using the docker based one? the version of Kubectl is actually from the github runner, and you can change it using this action: https://github.com/Azure/setup-kubectl
👀 1
d
Sorry; we're in AWS.
I've been trying to use https://github.com/pulumi/actions#pulumi---nodejs-runtime--pulumi-managed-backend as we're using TS for our Pulumi
b
that action isn't an azure thing, it'll just install kubectl into your github actions runner
just try the following:
Copy code
name: Pulumi
on:
  push:
    branches:
      - master
jobs:
  up:
    name: Update
    runs-on: ubuntu-latest
    steps:
      - uses: azure/setup-kubectl@v2.0
      - uses: actions/checkout@v2
      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - run: npm install
      - uses: pulumi/actions@v3
        with:
          command: up
          stack-name: dev
        env:
          PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
d
will do; stand by
b
it might be worth taking some time to understand how actions work, each step is a unique thing, and if you don't invoke a step you get the default version of a tool
d
Thanks
Had to edit it a bit
Copy code
name: Pulumi
on:
  - pull_request

jobs:
  up:
    name: Preview
    runs-on: [self-hosted, linux, x64]
    steps:
      - uses: azure/setup-kubectl@v2.0
      - uses: actions/checkout@v2
      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - run: npm install
      - uses: pulumi/actions@v3
        with:
          command: preview
          stack-name: xxxxx
        env:
          PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
Copy code
Error: Could not find aws CLI for EKS. See <https://github.com/pulumi/pulumi-eks> for installation instructions.
I've been down this rabbit hole 🙂
b
huh, can you file an issue with github.com/pulumi/pulumi-eks
that shouldn't be happening
d
This... is how I ended up here
😞
b
oh wait
no, that's not asking for kubectl
its asking for the aws cli
d
It's looking for
aws eks
afaict
b
yeah, which is completely different from kubectl
you should be able to do
Copy code
run: pip3 install aws-cli
again, this isn't a Pulumi problem, its a github actions problem 🙂
d
I'd argue that if your documentation points to a pulumi developed github action for customers to use and it doesn't work as described, that would be a pulumi problem - but I won't fight ya over it 🙂
I think there's other issues with this action as described - even before hitting the awscli missing issue, npm install fails to install all the deps (but does not report failure)
Copy code
There was an error installing the resource provider plugin. It looks like `pulumi` is not installed on your system. Please visit
Copy code
name: Pulumi
on:
  push:
    branches:
      - master
jobs:
  up:
    name: Update
    runs-on: ubuntu-latest
    steps:
      - uses: azure/setup-kubectl@v2.0
      - uses: actions/checkout@v2
      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - run: npm install
      - uses: pulumi/actions@v3
        with:
          command: up
          stack-name: dev
        env:
          PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
The example calls for
npm install
and explodes when looking for pulumi cli, which doesn't exist until it reaches the `pulumi/actions#v3`step.. I don't understand how this could ever work? Maybe I'm grossly misunderstanding something here?
l
Hello @damp-room-84921, is there any output I could see from the failing
npm install
? I'm using the Pulumi GH action succesfully, with only a small difference though:
actions/setup-node@v1
is highly outdated. Can you update to
v2
or
v3
? I'm using it with
v2
and also have the Pulumi GH action after the
npm install
.
d
Hey @limited-rainbow-51650. It's this for every module it attempts to grab:
Copy code
There was an error installing the resource provider plugin. It looks like `pulumi` is not installed on your system. Please visit <https://pulumi.com/> to install the Pulumi CLI.
You may try manually installing the plugin by running `pulumi plugin install resource docker v3.0.0`
I can swap to nodev3 and see if it budges.
b
@damp-room-84921 Ringo is advocating chaning the github action version:
Copy code
- name: Setup Node
        uses: actions/setup-node@v2
        with:
          node-version: 14.x
not the pulumi provider version
d
Yeah, that's how I interpreted his message 🙂
ty
l
@damp-room-84921 this puzzles me. In Pulumiverse, the community around Pulumi, we have a project where we automate that Github organization using Pulumi. Here is the workflow file: https://github.com/pulumiverse/infra/blob/main/.github/workflows/push.yml and here is the latest run: https://github.com/pulumiverse/infra/runs/6394331956?check_suite_focus=true
d
I'll come back to this shortly; i'm currently stuck behind the
<http://client.authentication.k8s.io/v1alpha1|client.authentication.k8s.io/v1alpha1>
bug
e
Let me know how it turns out, I can provide you with a working Workflow.
I have a few examples for AWS as well, if you need 🙂
d
Sure! let me see what AWS examples you've got. I finally just got around the IDMS issue when using a self-hosted runner. That was a blast.