AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1134575
Accepted
Riccardo Magrini
Riccardo Magrini
Asked: 2019-04-18 00:18:57 +0800 CST2019-04-18 00:18:57 +0800 CST 2019-04-18 00:18:57 +0800 CST

在 OpenStack 之上使用 Juju 部署应用程序

  • 772

我想在 JUJU 中为 OPENSTACK 创建一个新云,并使用它在我的实例上部署应用程序。在我的实验室中,正确安装了 MAAS、JUJU 和 OPENSTACK,并且实例工作正常。我已遵循本指南,但最后在引导期间收到此错误:

ERROR authentication failed.: authentication failed

知识产权计划:

Network: 10.20.81.0/24
Maas: 10.20.81.1
Juju: 10.20.81.2
Openstack: 10.20.81.21-24
External Gateway: 10.20.81.254
Private Network: 10.1.0.0/24
Instance: 10.1.0.12 - 10.20.81.220 (floating IP)
Private Gateway: 10.1.0.1
Private DHCP service: 10.1.0.10

网络拓扑结构:

                          +-------------+
                              Firewall
                            10.20.81.254
                          +-------------+
                                 | 
+-------------------------------------------------------------+
                              Switch 
      vlan81              vlan81                  vlan81
+-------------------------------------------------------------+
        |                   |                   || | | |
+--------------+     +-------------+       +------------------+
|Maas+Juju           |Juju Gui|            |Openstack
|10.20.81.1          |10.20.81.2           |10.20.81.21-24
+--------------+     +-------------+       +------------------+
                                                     |
                                +----------------------------------------+
                                Private Subnet-1           Public Subnet-2
                                 10.1.0.0/24                10.20.81.0/24
                                 +---+----+--+              +---+------+
                                 |   |        +----+            |
                                 |   |     .1 |    |.221        |
                                 |   +--------+ VR +------------+
                                 |            |    |
                                 +--+-+       +----+
                                 |    |
                                 |VM |
                                 |.12 |
                                 |    |
                                 +----+

这些命令已在我安装了 juju 的 MAAS 服务器上启动。

在此处输入图像描述

   $:juju add-cloud
    Cloud Types
      lxd
      maas
      manual
      openstack
      vsphere

Select cloud type: openstack
    Enter a name for your openstack cloud: openstack-cloud
    Enter the API endpoint url for the cloud []: http://10.20.81.22:5000/v3
    Enter a path to the CA certificate for your cloud if one is required to access it. (optional) [none]: 
    Auth Types
  access-key
  userpass
    Select one or more auth types separated by commas: userpass
    Enter region name: RegionOne
   Enter the API endpoint url for the region [use cloud api url]: 
    Enter another region? (y/N): n
   Cloud "openstack-cloud" successfully added
    You will need to add credentials for this cloud (`juju add-credential openstack-cloud`)
before creating a controller (`juju bootstrap openstack-cloud`).


$:juju add-credential openstack-cloud
Enter credential name: richardsith
    Using auth-type "userpass".
    Enter username: admin
    Enter password: 
    Enter tenant-name (optional): 
    Enter tenant-id (optional): 
    Enter version (optional): 
    Enter domain-name (optional): 
    Enter project-domain-name (optional): 
    Enter user-domain-name (optional): 
    Credential "admin" added locally for cloud "openstack-cloud".


Maas_$:juju bootstrap openstack-cloud
ERROR authentication failed.: authentication failed
caused by: requesting token failed
caused by: Resource at http://10.20.81.22:5000/v3/tokens not found
caused by: request (http://10.20.81.22:5000/v3/tokens) returned unexpected status: 404; error info: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>

然后

Maas_$:juju list-credentials --format yaml --show-secrets
local-credentials:
  maas-cloud:
    richardsith:
      auth-type: oauth1
      maas-oauth: j3GCen9ncJfJQYQ5ZS:ef59sS4XdwhxVPXLSR:TcxGjfyDXS42yj7afbzWrAuhMJtvNWq5
  openstack-cloud:
    richardsith:
      auth-type: userpass
      password: r1ch@rd!
      username: admin

Maas_$:juju show-cloud openstack-cloud
defined: local
type: openstack
description: Openstack Cloud
auth-types: [userpass]
endpoint: http://10.20.81.22:5000/v3
regions:
  RegionOne: {}

在我的浏览器上打开该网址我已经:

在此处输入图像描述

juju openstack
  • 1 1 个回答
  • 467 Views

1 个回答

  • Voted
  1. Best Answer
    Riccardo Magrini
    2019-05-08T02:11:51+08:002019-05-08T02:11:51+08:00

    我已经解决了以这种方式填写凭证

    $: juju add-credential openstack-cloud
     Enter credential name: openstack_credential
     Using auth-type "userpass".
     Enter username: admin
     Enter password: 
     Enter tenant-name (optional): u1804Pro 
     Enter tenant-id (optional): 
     Enter version (optional): 
     Enter domain-name (optional):
     Enter project-domain-name (optional): u1804Dom 
     Enter user-domain-name (optional): u1804Dom
     Credential "openstack-credential" added locally for cloud "openstack-cloud".
    

    在哪里:

    • u1804Dom 是我在 Openstack 中定义的新域
    • u1804Pro 我在 Openstack 中定义的新项目

    现在我可以在没有错误的情况下启动引导程序

    $:juju bootstrap openstack-cloud --bootstrap-series=bionic --config network="Private Network IPv4"  --config external-network="Floating Network IPv4" --config use-floating-ip=true --metadata-source ~/simplestreams/images --debug
    
    • 1

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve