Thread
#general
    d

    damp-room-84921

    4 months ago
    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

    billowy-army-68599

    4 months ago
    @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
    d

    damp-room-84921

    4 months ago
    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

    billowy-army-68599

    4 months ago
    that action isn't an azure thing, it'll just install kubectl into your github actions runner
    just try the following:
    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

    damp-room-84921

    4 months ago
    will do; stand by
    b

    billowy-army-68599

    4 months ago
    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

    damp-room-84921

    4 months ago
    Thanks
    Had to edit it a bit
    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 }}
    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

    billowy-army-68599

    4 months ago
    huh, can you file an issue with github.com/pulumi/pulumi-eks
    that shouldn't be happening
    d

    damp-room-84921

    4 months ago
    This... is how I ended up here
    😞
    b

    billowy-army-68599

    4 months ago
    oh wait
    no, that's not asking for kubectl
    its asking for the aws cli
    d

    damp-room-84921

    4 months ago
    It's looking for
    aws eks
    afaict
    b

    billowy-army-68599

    4 months ago
    yeah, which is completely different from kubectl
    you should be able to do
    run: pip3 install aws-cli
    again, this isn't a Pulumi problem, its a github actions problem 🙂
    d

    damp-room-84921

    4 months ago
    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)
    There was an error installing the resource provider plugin. It looks like `pulumi` is not installed on your system. Please visit
    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#v3step.. I don't understand how this could ever work? Maybe I'm grossly misunderstanding something here?
    l

    limited-rainbow-51650

    4 months ago
    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

    damp-room-84921

    4 months ago
    Hey @limited-rainbow-51650. It's this for every module it attempts to grab:
    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

    billowy-army-68599

    4 months ago
    @damp-room-84921 Ringo is advocating chaning the github action version:
    - name: Setup Node
            uses: actions/setup-node@v2
            with:
              node-version: 14.x
    not the pulumi provider version
    d

    damp-room-84921

    4 months ago
    Yeah, that's how I interpreted his message 🙂
    ty
    l

    limited-rainbow-51650

    4 months ago
    @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

    damp-room-84921

    4 months ago
    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

    elegant-window-55250

    4 months ago
    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

    damp-room-84921

    4 months ago
    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.