How to retrieve api key for IBM containers after first usage - ibm-cloud

the api key, used in 'ice login -k xxx', was shown when I started to use IBM containers beta. After that, where can I retrieve my api key in case I forgot it?

If you have the latest version of the cli you just need to type ice login and it will log you into to the Containers Service. The cli with authenticate you with your Bluemix username and password.
To check what version of the CLI you have installed type the following.
[09:18 PM]>pip list | grep icecli
icecli (2.0)
As of this writing the latest version is 2.0.
The latest installer as of this writing can be fetched from https://static-ice.ng.bluemix.net/icecli-2.0.zip.

The 'ice login' does not require -k option any more. If unauthorized error is shown after 'ice login', delete lines 'x_auth_token' and 'api_key' from ~/.ice/ice-cfg.ini, and try 'ice login' again, everything should work fine.

Related

How can I go about using Hasura CLI to export metadata via Windows Active Directory Login?

Here is information about our technical environment:
Hasura GraphQL Current server version: v2.6.2-pro.1
Hasura CLI version 2.15.0
We log onto the Hasura GraphQL Web UI Console using our Windows Active Directory Login (essentially Single-SignOn SSO) (therefore,
we do not have an admin secret)
However, the official Hasura GraphQL Technical Tutorial Guide only gives examples showing the admin secret being supplied in the Hasura CLI command line console arguments (https://hasura.io/docs/latest/migrations-metadata-seeds/migrations-metadata-setup/)
hasura init demo-project --endpoint https://docs-demo.hasura.app --admin-secret mySecret
How can I go about using Hasura CLI to export metadata via Windows Active Directory Login? (I would be interested in Hasura CLI command line examples).
as of now you’ll have to set an admin secret via environment variables and use that via the CLI. Please file a feature request via Github if you need this so we can get it tracked and prioritized.

Get Influxdb V2 token only in CLI after upgrading from version 1x to 2x

Upgraded influxDb from v1.8.10 to v2.3.0+SNAPSHOT.090f681737 with below command
(https://docs.influxdata.com/influxdb/v2.3/upgrade/v1-to-v2/automatic-upgrade/)
influxd upgrade --username='admin' --password='adminpass1234' --org='test' --bucket='testbucket' --force
Now trying to get or create token of influxdb with CLI commands to process with other command(like creating buckets, users and etc). To create new token I need to pass token which is only available in Influx Dashboard right now, I would like to pass username and password but only token is option (https://docs.influxdata.com/influxdb/v2.3/security/tokens/create-token/)
influx v1 auth create -username admin
I don't want to go to influxdb dashboard page and get token from there because my script should work automatically without depending any manual actions in UI. It's ansible script.
Don't know if there is a any option which can help to solve this problem.
Client config should be created during upgrade, you can list it, the output contains the token
influx config ls --json

How to use a Notary client to access IBM Cloud notary server

I got the following error when trying to use a Notary client to get the digest of a signed image in my IBM Container Registry. Can anyone advise how to solve it?
# notary -s https://us.icr.io:4443 lookup us.icr.io/securek8s/hello-world latest
* fatal: unauthorized: The login credentials are not valid, or your IBM Cloud account is not active.
BTW, I built the Notary client from https://github.com/theupdateframework/notary
Notary uses your credentials from your Docker login cache. The error message that you received suggests that your login to us.icr.io isn't valid. This usually means that your credentials have expired.
If you have the ibmcloud CLI and the container-registry plugin installed, you can refresh your login by making sure that you're targeting the US South registry (ibmcloud cr region-set us.icr.io) and then logging in with ibmcloud cr login.
If you don't have the CLI plugin installed, you can log in using Docker commands directly. For more information, see Automating access to IBM Cloud Container Registry
in the IBM Cloud docs.

credhub login does not work after deploying CF on virtualbox using Bosh

I have installed CF on virtualbox using BOSH. Now I would like to use CF CLI and install an application on CF. For that, I am following instructions here: https://github.com/cloudfoundry/cf-deployment/blob/master/deployment-guide.md
It suggests to run "credhub login" and get the CF credentials to log in to CF. However, credhub login does not work. It doesn't identify the credhub command. My understanding is that credhub gets installed along with CF during deployment process which doesn't seem to be the case.
I am wondering how do i fetch the admin password for Cloud Foundry that I just installed on a virtualbox using bosh as credhub doesn't seem to work.
I also don't see a password for CF in credhub.yml in bosh-deployment folder.
I am not sure how this works. Any help would be highly appreciated.

AWS Missing Authentication Token

I am following this tutorial for connecting Raspberry Pi to AWS IoT using Node.js SDK. I see the following in vim ~/.aws/credentials
[default]
aws_access_key_id = SOMETHING
aws_secret_access_key = SOMETHINGELSE
When I enter the command aws iot describe-endpoint I get the following response:
{
"endpointAddress": "A34SXNTM6AT7XH.iot.us-west-2.amazonaws.com"
}
However when I browse to that URL: https://a34sxntm6at7xh.iot.us-west-2.amazonaws.com/
I get the following error:
Missing Authentication Token
Any idea what could be wrong and how could it be solved?
Here's the files in the ~/certs folder:
pi#raspberrypi:~/certs $ ls
certificate.pem.crt private.pem.key public.pem.key root-CA.pem
Mona,
Your custom endpoint responds to two protocols: MQTT and HTTPS. However, it does not serve any web content and thus does not work in the browser as a site URL. The "endpointAddress" you get from aws iot describe-endpoint will be plugged into your Node.js Device SDK that you're using in the Raspberry Pi example you linked (no https://).
You can also interface with device shadows using the HTTPS version of the endpoint by signing requests with AWS Signature version 4. More on that here: http://docs.aws.amazon.com/iot/latest/developerguide/thing-shadow-rest-api.html and here: http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html though you will likely get going faster by using the AWS CLI or AWS SDK to perform operations like this.
Ryan # AWS
By default, the example programs will look in the current directory for your certificate and private key files, but you can also use the '-f' option to specify another directory if you want to. As for the 'Missing Authentication Token' message you noticed when trying to access the endpoint from your browser, you can safely ignore it.
If you use "TLS mutual authentication" you need to connect on port 8443, so in your example, it would be https://a34sxntm6at7xh.iot.us-west-2.amazonaws.com:8443/things/<thing_name>/shadow