I have also confirmed that the file is generated i...
# dotnet
n
I have also confirmed that the file is generated in the
/tmp/pulumi
directory. We would greatly appreciate any assistance you can provide in resolving this issue. Thank you for your attention to this matter.
e
Is the pulumi cli installed on the pod and findable on PATH?
n
we are using Pulumi NuGet package and haven't install pulumi cli. we are setting up the WorkDir = Path.Combine("..", "tmp", "pulumi")
e
automation api needs the CLI installed as well. It doesn't do that automatically when installing the nuget.
n
how can we install the automation api in pod
we deploy our application in k8
e
Depends what the pod based on. But for most linux pods you can just run the install script from get.pulumi:
Copy code
curl -fsSL <https://get.pulumi.com> | sh
n
don't you think is this related to working path not set correctly or permission issue?
e
I mean possibly, but I'd wager more that its just that the cli isn't installed
n
Install the pulumi cli but still the same issue
e
does "/tmp/pulumi" already exist? I don't think you can point a working directory to a non-existant folder even if the process would have permission to create that folder.
n
yes it is exists and it is create by the process /tmp $ ls -l total 8 drwxr-xr-x 7 61816 61816 4096 May 30 09:11 HorizonTenantDefinitions drwxr-xr-x 2 61816 61816 4096 May 30 09:11 pulumi
even I can see 2 file inside the pulumi /tmp/pulumi $ ls -l total 8 -rw-r--r-- 1 61816 61816 74 May 30 09:11 Pulumi.testing.yaml -rw-r--r-- 1 61816 61816 79 May 30 09:11 Pulumi.yaml
e
If you exec the pod image (docker run or similar) and try and run
pulumi
does it work?
n
opps I run this in pod but not found /tmp/pulumi $ pulumi ash: pulumi: not found
I already added below line to docker file RUN curl -fsSL https://get.pulumi.com | sh
e
That may have ran and installed as root and may not be findable by user 61816 that your now running as
n
so any other alternative ?
e
Fix the install? automation api needs the CLI, I can't speak for your specific image requirements but you need to install the CLI in that image somehow such that it's usable by the user you then run as. You can try copying exactly how our images do the install (https://github.com/pulumi/pulumi-docker-containers/blob/main/docker/pulumi/Dockerfile):
Copy code
# Install the Pulumi SDK, including the CLI and language runtimes.
RUN curl -fsSL <https://get.pulumi.com/> | bash -s -- --version $PULUMI_VERSION && \
  mv ~/.pulumi/bin/* /usr/bin
I can't debug your entire image and k8s setup, but not being able to exec
pulumi
is the problem you need to fix here.
n
Thanks let me try this.
It works with PULUMI CLI ans setting up the PULUMI_HOME ENV variable. Thank you for your assistance, it was greatly appreciated. However, we have encountered another error as shown below: stderr: error: could not load plugin for azure-native provider 'urnpulumitesting:pulumi test projectpulumiprovidersazure native:default_1_96_1_alpha_1677663752_6d16a4bf': failed to load plugin /tmp/pulumi/plugins/resource-azure-native-v1.96.1-alpha.1677663752+6d16a4bf/pulumi-resource-azure-native: plugin not found In our code, we have set up the plugins as follows: logger.LogInformation("installing plugins..."); await stack.Workspace.InstallPluginAsync("azure", "v4.19.0"); await stack.Workspace.InstallPluginAsync("azure-native", "v1.47.0"); await stack.Workspace.InstallPluginAsync("azuread", "v5.9.0"); _logger.LogInformation("plugins installed"); We have attempted to use the latest version, but the issue persists. If you have any insights or ideas regarding this matter, please let us know. Thank you again for your help.
m
hello @echoing-dinner-19531, can you please help with this issue?
e
v1.96.1-alpha.1677663752+6d16a4bf
That's an alpha version of the SDK, you really really don't want to be using that. Fix up your nuget reference to ensure your pulling a non-alpha version of the sdk such as "1.97.0".
Or more accurately, given your installing azure-native 1.47.0, make sure that's the nuget version your using as well.
m
Thanks a lot, that is a problem caused the nuget version
n
Issue fixed thanks @echoing-dinner-19531