https://jujucharms.com/docs/1.25/config-LXC

Installation(Ubuntu)

#sudo add-apt-repository ppa:juju/stable  (我们使用1.25)
#sudo apt-get update && sudo apt-get install juju-core

Configuring

linux目录下有个配置文件;
~/.juju/environments.yaml
#juju generate-config

# This is the Juju config file, which you can use to specify multiple
# environments in which to deploy. See https://juju.ubuntu.com/docs
# for more information # An environment configuration must always specify at least the
# following information:
# - name (to identify the environment)
# - type (to specify the provider)
# In the following example the name is "myenv" and type is "ec2".
# myenv:
# type: ec2 # Values in <brackets> below need to be filled in by the user.
# Optional attributes are shown commented out, with
# a sample value or a value in <brackets>. # There are several settings supported by all environments, all of which
# are optional and have specified default values. For more info, see the
# Juju documentation. # The default environment is chosen when an environment is not
# specified using any of the following, in descending order of precedence:
# 1. -e or --environment command line parameter, passed after the command, e.g.
# $ juju add-unit -e myenv myservice
# 2. By setting JUJU_ENV environment variable.
# 3. Using the juju switch command like this:
# $ juju switch myenv
# # You can control how Juju harvests machines by using the
# provisioner-harvest-mode setting. Harvesting is a process wherein
# Juju attempts to reclaim unused machines.
#
# Options are:
#
# Don't harvest any machines.
# provisioner-harvest-mode: none
#
# Only harvest machines that Juju knows about and are dead.
# provisioner-harvest-mode: destroyed
#
# Only harvest machines that Juju doesn't know about.
# provisioner-harvest-mode: unknown
#
# Harvest both dead and unknown machines.
# provisioner-harvest-mode: all default: amazon environments:
# https://juju.ubuntu.com/docs/config-local.html
local:
type: local # root-dir holds the directory that is used for the storage files and
# database. The default location is $JUJU_HOME/<env-name>.
# $JUJU_HOME defaults to ~/.juju. Override if needed.
#
# root-dir: ~/.juju/local # storage-port holds the port where the local provider starts the
# HTTP file server. Override the value if you have multiple local
# providers, or if the default port is used by another program.
#
# storage-port: 8040 # network-bridge holds the name of the LXC network bridge to use.
# Override if the default LXC network bridge is different.
#
#
# network-bridge: lxcbr0 # The default series to deploy the state-server and charms on.
# Make sure to uncomment the following option and set the value to
# precise or trusty as desired.
#
# default-series: trusty # Whether or not to refresh the list of available updates for an
# OS. The default option of true is recommended for use in
# production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-refresh-update: true # Whether or not to perform OS upgrades when machines are
# provisioned. The default option of true is recommended for use
# in production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-upgrade: true gce:
type: gce # Google Auth Info
# The GCE provider uses OAuth to authenticate. This requires that
# you set it up and get the relevant credentials. For more information
# see https://cloud.google.com/compute/docs/api/how-tos/authorization.
# The key information can be downloaded as a JSON file, or copied, from:
# https://console.developers.google.com/project/<projet>/apiui/credential
# Either set the path to the downloaded JSON file here:
auth-file: # ...or set the individual fields for the credentials. Either way, all
# three of these are required and have specific meaning to GCE.
# private-key:
# client-email:
# client-id: # Google instance info
# To provision instances and perform related operations, the provider
# will need to know which GCE project to use and into which region to
# provision. While the region has a default, the project ID is
# required. For information on the project ID, see
# https://cloud.google.com/compute/docs/projects and regarding regions
# see https://cloud.google.com/compute/docs/zones.
project-id:
# region: us-central1 # The GCE provider uses pre-built images when provisioning instances.
# You can customize the location in which to find them with the
# image-endpoint setting. The default value is the a location within
# GCE, so it will give you the best speed when bootstrapping or adding
# machines. For more information on the image cache see
# https://cloud-images.ubuntu.com/.
# image-endpoint: https://www.googleapis.com
joyent:
type: joyent # SDC config
# Can be set via env variables, or specified here
# sdc-user: <secret>
# Can be set via env variables, or specified here
# sdc-key-id: <secret>
# url defaults to us-west-1 DC, override if required
# sdc-url: https://us-west-1.api.joyentcloud.com # Manta config
# Can be set via env variables, or specified here
# manta-user: <secret>
# Can be set via env variables, or specified here
# manta-key-id: <secret>
# url defaults to us-east DC, override if required
# manta-url: https://us-east.manta.joyent.com # Auth config
# private-key-path is the private key used to sign Joyent requests.
# Alternatively, you can supply "private-key" with the content of the private
# key instead supplying the path to a file.
# private-key-path: ~/.ssh/foo_id
# algorithm defaults to rsa-sha256, override if required
# algorithm: rsa-sha256 # Whether or not to refresh the list of available updates for an
# OS. The default option of true is recommended for use in
# production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-refresh-update: true # Whether or not to perform OS upgrades when machines are
# provisioned. The default option of true is recommended for use
# in production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-upgrade: true # https://juju.ubuntu.com/docs/config-maas.html
maas:
type: maas # maas-server specifies the location of the MAAS server. It must
# specify the base path.
#
maas-server: 'http://192.168.1.1/MAAS/' # maas-oauth holds the OAuth credentials from MAAS.
#
maas-oauth: '<add your OAuth credentials from MAAS here>' # maas-server bootstrap ssh connection options
# # bootstrap-timeout time to wait contacting a state server, in seconds.
bootstrap-timeout: 1800 # Whether or not to refresh the list of available updates for an
# OS. The default option of true is recommended for use in
# production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-refresh-update: true # Whether or not to perform OS upgrades when machines are
# provisioned. The default option of true is recommended for use
# in production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-upgrade: true manual:
type: manual
# bootstrap-host holds the host name of the machine where the
# bootstrap machine agent will be started.
bootstrap-host: somehost.example.com # bootstrap-user specifies the user to authenticate as when
# connecting to the bootstrap machine. It defaults to
# the current user.
# bootstrap-user: joebloggs # storage-listen-ip specifies the IP address that the
# bootstrap machine's Juju storage server will listen
# on. By default, storage will be served on all
# network interfaces.
# storage-listen-ip: # storage-port specifes the TCP port that the
# bootstrap machine's Juju storage server will listen
# on. It defaults to 8040
# storage-port: 8040
# Whether or not to refresh the list of available updates for an
# OS. The default option of true is recommended for use in
# production systems.
#
# enable-os-refresh-update: true # Whether or not to perform OS upgrades when machines are
# provisioned. The default option of false is set so that Juju
# does not subsume any other way the system might be
# maintained.
#
# enable-os-upgrade: false vmware:
type: vsphere # IP address or DNS name of vsphere API host.
host: # Vsphere API user credentials.
user:
password: # Name of vsphere datacenter.
datacenter: # Name of the network, that all created vms will use ot obtain public ip address.
# This network should have ip pool configured or DHCP server connected to it.
# This parameter is optional.
extenal-network:
# https://juju.ubuntu.com/docs/config-azure.html
azure:
type: azure # location specifies the place where instances will be started,
# for example: West US, North Europe.
#
location: West US # The following attributes specify Windows Azure Management
# information. See:
# http://msdn.microsoft.com/en-us/library/windowsazure
# for details.
#
management-subscription-id: 00000000-0000-0000-0000-000000000000
management-certificate-path: /home/me/azure.pem # storage-account-name holds Windows Azure Storage info.
#
storage-account-name: abcdefghijkl # force-image-name overrides the OS image selection to use a fixed
# image for all deployments. Most useful for developers.
#
# force-image-name: b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-13_10-amd64-server-DEVELOPMENT-20130713-Juju_ALPHA-en-us-30GB # image-stream chooses a simplestreams stream from which to select
# OS images, for example daily or released images (or any other stream
# available on simplestreams).
#
# image-stream: "released" # agent-stream chooses a simplestreams stream from which to select tools,
# for example released or proposed tools (or any other stream available
# on simplestreams).
#
# agent-stream: "released" # Whether or not to refresh the list of available updates for an
# OS. The default option of true is recommended for use in
# production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-refresh-update: true # Whether or not to perform OS upgrades when machines are
# provisioned. The default option of true is recommended for use
# in production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-upgrade: true # https://juju.ubuntu.com/docs/config-cloudsigma.html
cloudsigma:
type: cloudsigma # region holds the cloudsigma region (zrh, lvs, ...).
#
# region: <your region> # credentials for CloudSigma account
#
# username: <your username>
# password: <secret>
# https://juju.ubuntu.com/docs/config-aws.html
amazon:
type: ec2 # region specifies the EC2 region. It defaults to us-east-1.
#
# region: us-east-1 # access-key holds the EC2 access key. It defaults to the
# environment variable AWS_ACCESS_KEY_ID.
#
# access-key: <secret> # secret-key holds the EC2 secret key. It defaults to the
# environment variable AWS_SECRET_ACCESS_KEY.
#
# secret-key: <secret> # image-stream chooses a simplestreams stream from which to select
# OS images, for example daily or released images (or any other stream
# available on simplestreams).
#
# image-stream: "released" # agent-stream chooses a simplestreams stream from which to select tools,
# for example released or proposed tools (or any other stream available
# on simplestreams).
#
# agent-stream: "released" # Whether or not to refresh the list of available updates for an
# OS. The default option of true is recommended for use in
# production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-refresh-update: true # Whether or not to perform OS upgrades when machines are
# provisioned. The default option of true is recommended for use
# in production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-upgrade: true # https://juju.ubuntu.com/docs/config-openstack.html
openstack:
type: openstack # use-floating-ip specifies whether a floating IP address is
# required to give the nodes a public IP address. Some
# installations assign public IP addresses by default without
# requiring a floating IP address.
#
# use-floating-ip: false # use-default-secgroup specifies whether new machine instances
# should have the "default" Openstack security group assigned.
#
# use-default-secgroup: false # network specifies the network label or uuid to bring machines up
# on, in the case where multiple networks exist. It may be omitted
# otherwise.
#
# network: <your network label or uuid> # agent-metadata-url specifies the location of the Juju tools and
# metadata. It defaults to the global public tools metadata
# location https://streams.canonical.com/tools.
#
# agent-metadata-url: https://your-agent-metadata-url # image-metadata-url specifies the location of Ubuntu cloud image
# metadata. It defaults to the global public image metadata
# location https://cloud-images.ubuntu.com/releases.
#
# image-metadata-url: https://your-image-metadata-url # image-stream chooses a simplestreams stream from which to select
# OS images, for example daily or released images (or any other stream
# available on simplestreams).
#
# image-stream: "released" # agent-stream chooses a simplestreams stream from which to select tools,
# for example released or proposed tools (or any other stream available
# on simplestreams).
#
# agent-stream: "released" # auth-url defaults to the value of the environment variable
# OS_AUTH_URL, but can be specified here.
#
# auth-url: https://yourkeystoneurl:443/v2.0/ # tenant-name holds the openstack tenant name. It defaults to the
# environment variable OS_TENANT_NAME.
#
# tenant-name: <your tenant name> # region holds the openstack region. It defaults to the
# environment variable OS_REGION_NAME.
#
# region: <your region> # The auth-mode, username and password attributes are used for
# userpass authentication (the default).
#
# auth-mode holds the authentication mode. For user-password
# authentication, auth-mode should be "userpass" and username and
# password should be set appropriately; they default to the
# environment variables OS_USERNAME and OS_PASSWORD respectively.
#
# auth-mode: userpass
# username: <your username>
# password: <secret> # For key-pair authentication, auth-mode should be "keypair" and
# access-key and secret-key should be set appropriately; they
# default to the environment variables OS_ACCESS_KEY and
# OS_SECRET_KEY respectively.
#
# auth-mode: keypair
# access-key: <secret>
# secret-key: <secret> # Whether or not to refresh the list of available updates for an
# OS. The default option of true is recommended for use in
# production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-refresh-update: true # Whether or not to perform OS upgrades when machines are
# provisioned. The default option of true is recommended for use
# in production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-upgrade: true # https://juju.ubuntu.com/docs/config-hpcloud.html
hpcloud:
type: openstack # use-floating-ip specifies whether a floating IP address is
# required to give the nodes a public IP address. Some
# installations assign public IP addresses by default without
# requiring a floating IP address.
#
# use-floating-ip: true # use-default-secgroup specifies whether new machine instances
# should have the "default" Openstack security group assigned.
#
# use-default-secgroup: false # tenant-name holds the openstack tenant name. In HPCloud, this is
# synonymous with the project-name It defaults to the environment
# variable OS_TENANT_NAME.
#
# tenant-name: <your tenant name> # image-stream chooses a simplestreams stream from which to select
# OS images, for example daily or released images (or any other stream
# available on simplestreams).
#
# image-stream: "released" # agent-stream chooses a simplestreams stream from which to select tools,
# for example released or proposed tools (or any other stream available
# on simplestreams).
#
# agent-stream: "released" # auth-url holds the keystone url for authentication. It defaults
# to the value of the environment variable OS_AUTH_URL.
#
# auth-url: https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/ # region holds the cloud region (e.g. region-a.geo-1). It
# defaults to the environment variable OS_REGION_NAME.
#
# region: <your region> # auth-mode holds the authentication mode. For user-password
# authentication, auth-mode should be "userpass" and username and
# password should be set appropriately; they default to the
# environment variables OS_USERNAME and OS_PASSWORD respectively.
#
# auth-mode: userpass
# username: <your_username>
# password: <your_password> # For key-pair authentication, auth-mode should be "keypair" and
# access-key and secret-key should be set appropriately; they
# default to the environment variables OS_ACCESS_KEY and
# OS_SECRET_KEY respectively.
#
# auth-mode: keypair
# access-key: <secret>
# secret-key: <secret> # Whether or not to refresh the list of available updates for an
# OS. The default option of true is recommended for use in
# production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-refresh-update: true # Whether or not to perform OS upgrades when machines are
# provisioned. The default option of true is recommended for use
# in production systems, but disabling this can speed up local
# deployments for development or testing.
#
# enable-os-upgrade: true
#juju bootstrap(注意这里要跟一个集群)

  

juju入门的更多相关文章

  1. Windows Azure 现已完全受 Juju 支持

    我们很高兴地宣布,Windows Azure 现已完全受 Juju 支持,这也是我们为实现开放性和互操作性而不断努力的结果.这意味着 Ubuntu 用户现在可以使用 Juju 及其直观的图形用户界面设 ...

  2. CEPH集群操作入门--配置

      参考文档:CEPH官网集群操作文档   概述 Ceph存储集群是所有Ceph部署的基础. 基于RADOS,Ceph存储集群由两种类型的守护进程组成:Ceph OSD守护进程(OSD)将数据作为对象 ...

  3. 从入门到精通Puppet的实践之路

    本文有感于<精通Puppet配置管理工具>在豆瓣上的某些差评而顺手写的书评. 半路出家   故事要从12年初说起.  某天,部门老大让我所在team的老大调研一下当下业界的配置管理工具.于 ...

  4. Angular2入门系列教程7-HTTP(一)-使用Angular2自带的http进行网络请求

    上一篇:Angular2入门系列教程6-路由(二)-使用多层级路由并在在路由中传递复杂参数 感觉这篇不是很好写,因为涉及到网络请求,如果采用真实的网络请求,这个例子大家拿到手估计还要自己写一个web ...

  5. ABP入门系列(1)——学习Abp框架之实操演练

    作为.Net工地搬砖长工一名,一直致力于挖坑(Bug)填坑(Debug),但技术却不见长进.也曾热情于新技术的学习,憧憬过成为技术大拿.从前端到后端,从bootstrap到javascript,从py ...

  6. Oracle分析函数入门

    一.Oracle分析函数入门 分析函数是什么?分析函数是Oracle专门用于解决复杂报表统计需求的功能强大的函数,它可以在数据中进行分组然后计算基于组的某种统计值,并且每一组的每一行都可以返回一个统计 ...

  7. Angular2入门系列教程6-路由(二)-使用多层级路由并在在路由中传递复杂参数

    上一篇:Angular2入门系列教程5-路由(一)-使用简单的路由并在在路由中传递参数 之前介绍了简单的路由以及传参,这篇文章我们将要学习复杂一些的路由以及传递其他附加参数.一个好的路由系统可以使我们 ...

  8. Angular2入门系列教程5-路由(一)-使用简单的路由并在在路由中传递参数

    上一篇:Angular2入门系列教程-服务 上一篇文章我们将Angular2的数据服务分离出来,学习了Angular2的依赖注入,这篇文章我们将要学习Angualr2的路由 为了编写样式方便,我们这篇 ...

  9. Angular2入门系列教程4-服务

    上一篇文章 Angular2入门系列教程-多个组件,主从关系 在编程中,我们通常会将数据提供单独分离出来,以免在编写程序的过程中反复复制粘贴数据请求的代码 Angular2中提供了依赖注入的概念,使得 ...

随机推荐

  1. BUPT复试专题—网络传输(2014网研)

    题目描述 网络的高效互联与智能传输是提升海量用户服务请求映射效率的重要措施.在这个任务中,你需耍在最小的传输时间内,将数据源传输到指定的网络节点中.我们给定的网络一共包含N个节点,其中节点1为数据源. ...

  2. Linux中修改docker镜像源及安装docker

    1.首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.re ...

  3. UP Board USB无线网卡选购指南

    前言 原创文章,转载引用务必注明链接,水平有限,欢迎指正. 本文环境:ubilinux 3.0 kernel 4.4.0 本文使用Markdown写成,为获得更好的阅读体验和正常的图片.链接,请访问我 ...

  4. sort-list——链表、快慢指针找中间、归并排序

    Sort a linked list in O(n log n) time using constant space complexity. 链表,快慢指针找中点,归并排序. 注意判断条件fast-& ...

  5. Eclipse中移除native层编译支持

    1. .project 文件 删除全部包括 org.eclipse.cdt前缀的xml结点元素.以下是一个包括cdt的完整编译配置文件. <?xml version="1.0" ...

  6. YII 多子域名同步登录

    a.meylou.com和b.meylou.com不做登录.c.meylou.com这个专门做用户登录.c站登录之后a,b站点同时登录. 第一步:修改php.ini配置文件,把cookie_domai ...

  7. C#语言 数组

  8. Java 兔子问题(斐波那契数列)扩展篇

    Java兔子问题(斐波那契数列)扩展篇 斐波那契数列指的是这样一个数列 0, 1, 1, 2,3, 5, 8, 13, 21, 34, 55, 89, 144, ...对于这个数列仅仅能说将兔子生产周 ...

  9. 用python编写的简易端口扫描器

    #coding = utf-8 ''' python 3.4 通过简单的TCP端口连接来判断指定IP是否开放了指定端口. ''' import socket import optparse impor ...

  10. MySQL 数据库 的安装和基本管理

    03-MySql安装和基本管理   本节掌握内容: mysql的安装.启动 mysql破解密码 统一字符编码 MySQL是一个关系型数据库管理系统,由瑞典MySQL AB 公司开发,目前属于 Orac ...