How do I disable the version check output in pulumi? - pulumi

I want to use pulumi in my CI and do commands like this:
export DATABASE_PASSWORD=$(pulumi config get dbPassword)
but how to I stop this from printing into it:
warning: A new version of Pulumi is available. To upgrade from version '2.12.1' to '2.13.0', visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.

It's possible to skip the update check by setting the PULUMI_SKIP_UPDATE_CHECK environment variable to a truthy value. See also: https://www.pulumi.com/docs/reference/cli/environment-variables/

Related

How to edit configuration file Helm chart

I install garafana/loki with helm , now I want to change some configuration file , how can i edit it ? for example increase log store size and etc.
Generally with helm charts you have a documentation which explains and details all the configurations that you can update.
If there's no documentation, go into the code and check if you find a {{ .Values.xxx }}. The "xxx" will be the name of the config to use to update the value.
So you can add these values in the values.yaml file or add it directly in the command line --set livenessProbe.exec.command=[cat,docroot/CHANGELOG.txt]. (if you want you can create your own yaml file and pass as parameter too...)
If the value you want seems to be fixed and you can't update it, download the chart, do your update and use it instead of the other one.
And for a project open source, you can open a Pull Request with your update to let other people use it too.
I hope it will help you.

Where to put "FASTLANE_SESSION" value?

I'm using fastlane with Fastfile and Appfile
According this doc, i did create FASTLANE_SESSION variable in order to not enter a two-factor verification password every buildtime. But can't figure out where and how to put it to make it work. I don't use CI service, only fastlane in command line to deploy my ios build. Help please.
Run and follow the instructions: fastlane spaceauth -u some#email.com
When asked to copy the session, you can just say no. Fastlane will store it on your Mac.
You should really consider creating an API Key. Then you will avoid this.
Docs: https://docs.fastlane.tools/app-store-connect-api/#creating-an-app-store-connect-api-key
You need FASTLANE_SESSION available as an environment variable. If you're only running on command line you can do export FASTLANE_SESSION='<your-session>' and the next time you run the lanes that require the session should work.

Error in Google Cloud Shell Commands while working on the lab (Securing Google Cloud with CFT Scorecard)

I am working in a GCP lab (Securing Google Cloud with CFT Scorecard). All instructions for the lab are given.
First I have to run the following two commands to set environment variables
export GOOGLE_PROJECT=$DEVSHELL_PROJECT_ID
export CAI_BUCKET_NAME=cai-$GOOGLE_PROJECT
In the second command given above I don't know what to replace with my own credentials? May be that is the reason I am getting error.
Now I have to enable the "cloudasset.googleapis.com" gcloud service. For this they gave the following command.
gcloud services enable cloudasset.googleapis.com \
--project $GOOGLE_PROJECT
Error for this is given in the screeshot attached herewith:
Error in the serviec enabling command
Next step is to clone the policy: The given command for that is:
git clone https://github.com/forseti-security/policy-library.git
After that they said: "You realize Policy Library enforces policies that are located in the policy-library/policies/constraints folder, in which case you can copy a sample policy from the samples directory into the constraints directory".
and gave this command:
cp policy-library/samples/storage_blacklist_public.yaml policy-library/policies/constraints/
On running this command I received this:
error on running the directory command
Finally they said "Create the bucket that will hold the data that Cloud Asset Inventory (CAI) will export" and gave the following command:
gsutil mb -l us-central1 -p $GOOGLE_PROJECT gs://$CAI_BUCKET_NAME
I am confused in where to replace my own credentials like in the place of project_Id I wrote my own project id.
Also I don't know these errors are ocurring. Kindly help me.
I'm unable to access the tutorial.
What happens if you run the following:
echo ${DEVSHELL_PROJECT_ID}
I suspect you'll get an empty result because I think this environment variable isn't actually set.
I think it should be:
echo ${DEVSHELL_GCLOUD_CONFIG}
Does that return a result?
If so, perhaps try using that variable instead:
export GOOGLE_PROJECT=${DEVSHELL_GCLOUD_CONFIG}
export CAI_BUCKET_NAME=cai-${GOOGLE_PROJECT}
It's not entirely clear to me why this tutorial is using this approach but, if the above works, it may get you further along.
We're you asked to create a Google Cloud Platform project?
As per the shared error, this seems to be because your env variable GOOGLE_PROJECT is not set. You can verify it by using echo $GOOGLE_PROJECT and seeing whether it returns the project ID or not. You could also use echo $DEVSHELL_PROJECT_ID. If that returns the project ID and the former doesn't, it means that you didn't export the variable as stated at the beginning.
If the problem is that GOOGLE_PROJECT doesn't have any value, there are different approaches on how to solve it.
Set the env variable as you explained at the beginning. Obviously this will only work if the variable DEVSHELL_PROJECT_ID is also set.
export GOOGLE_PROJECT=$DEVSHELL_PROJECT_ID
Manually set the project ID into that variable. This is far from ideal because in Qwiklabs they create a new temporal project on every lab, so this would've only worked if you were still on that project. The project ID can be seen on both of your shared screenshots.
export GOOGLE_PROJECT=qwiklabs-gcp-03-c6e1787dc09e
Avoid using the argument --project. According to the documentation, the aforementioned argument is optional and if none is used the command will take the one by default, which will be on the configuration settings. You can get the current project by using this:
gcloud config get-value project
If the previous command matches the project ID you want to use, you can simply issue the following command:
gcloud services enable cloudasset.googleapis.com
Notice that the project ID is not being explicitly mentioned using --project.
Regarding your issue with the GitHub file, I have checked the repository and the file storage_blacklist_public.yaml doesn't seem to be in the directory policy-library/samples. There seems to be a trace that it was once there, but it isn't anymore, they should probably update the lab as it isn't anymore.
About your credentials confusion, you don't have to use your own project ID, just the one given on your lab. If I recall properly all the needed data should be on the left side of the lab. Still, you shouldn't need to authenticate in a normal situation as you are already logged in your temporal project if you are accessing it form the Cloud Shell, which is where you should be doing all this.
Adding this for the later versions
in the gcloud shell you can set a temp variable for the current project id with
PROJECT_ID="$(gcloud config get-value project)"
then use like
--project ${PROJECT_ID}

Terraform with Azure - Resource actions symbols dont display correctly in the logs

When deploying a terraform task via Azure, the resulting logs dont display the resource symbols correctly.
2020-03-16T22:19:21.4807821Z An execution plan has been generated and is shown below.
2020-03-16T22:19:21.4808173Z Resource actions are indicated with the following symbols:
2020-03-16T22:19:21.4808433Z [32m+[0m create
2020-03-16T22:19:21.4808648Z [33m~[0m update in-place
2020-03-16T22:19:21.4808823Z [0m
2020-03-16T22:19:21.4809040Z Terraform will perform the following actions:
Wondering if its possible to get the correct symbols instead of the 32m+, etc.
To fix those weird characters just use the -no-color option on your plan and apply steps!
And for reference those weird values represent colors of the terminal - see: https://github.com/shiena/ansicolor/blob/master/README.md
No-Color option: https://www.terraform.io/docs/commands/plan.html#no-color
You're seeing ANSI codes, setting your Git Bash terminal to support xterm-256color is one way to see these (usually invisible) codes.

How to change a buildConfig in OpenShift 3

I'm working through the sample tutorial on OpenShift 3. I created the example application nodejs-mongodb-example. But in the "edit parameters" step, I put the wrong URL to my forked repository, and I get a failed build.
I thought maybe I'd be able to extract the buildConfig file (is that a template?) on the command line, but I haven't found a way to do that.
Is there a way to edit and replace this bad buildConfig without deleting all of the application objects and starting over?
You can use the oc edit command to edit an existing object. For example, oc edit buildconfig/myapp to edit the BuildConfig named myapp.
To add to #ncdc answer, here are the docs for oc :
https://docs.openshift.com/enterprise/3.0/cli_reference/basic_cli_operations.html
and specifically for oc edit :
https://docs.openshift.com/enterprise/3.0/cli_reference/basic_cli_operations.html#application-modification-cli-operations