LoginSignup
0
0

More than 1 year has passed since last update.

OPCELの資格を取りたくて、OpenStackを叩き始めたのはいいとして、
資格勉強本がREST API使って、サービス使ったりコマンド
を叩くためのトークンをKeystoneから発行するURLが全くわからなかった。

環境: Ubuntu-20.04.4
OpenStack: Yoga
構築方法: DevStack

#!/bin/bash
curl "http://localhost:5000/v3/auth/tokens"

普通はこのポートとURLにあるらしい。。。

でなんらかのヒントを得ようと "admin-openrc.sh"
を見たら、

export OS_AUTH_URL=http://192.168.0.10/identity

ってラインがあって、これの配下に無いかなって叩いたら大金星。

curl -i \
  -H "Content-Type: application/json" \
  -d '
{ "auth": {
    "identity": {
      "methods": ["password"],
      "password": {
        "user": {
          "name": "admin",
          "domain": { "id": "default" },
          "password": "your_password"
        }
      }
    }
  }
}' \
  "http://localhost/identity/v3/auth/tokens"; echo  
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0