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. 批量修改WORD表格属性

    有时候需要对word中很多表格的属性进行修改,而word无法批量修改属性,所有这里记录一个宏 Sub TableFormatter() Dim oTbl As Table, i As Integer ...

  2. ImportError: No module named _curses;Color support is disabled, python-curses is not installed.解决办法

    linux系统默认安装了python2.6, 但是发现python2.7 import curses时 提示 找不到_curses 错误.  用pip(python2.7 )安装了curses-204 ...

  3. react jsx 数组变量的写法

    1.通过 map 方法 var students = ["张三然","李慧思","赵思然","孙力气","王萌 ...

  4. 走入asp.net mvc不归路:[5]Action的返回

    asp.net mvc提供了多种返回方式,一方面使得视图可以重用,另一方面灵活强大,有直接返回视图,返回Json,返回文件流,返回到相同Controller的Action,返回到另一个Controll ...

  5. 深入浅出 - Android系统移植与平台开发(九)- Android系统system_server及Home启动

    3.3 Zygote守护进程与system_server进程 Android的执行环境和Java执行环境有着本质的差别,在Android系统中每一个应用程序都是一独立的进程,当一个进程死掉时,不会影响 ...

  6. T-SQL查询进阶--变量

    概述 变量对于一种语言是必不可少的一部分,当然,对于T-SQL来讲也是一样.在简单查询中,往往很少用到变量,但无论对于复杂的查询或存储过程中,变量都是必不可少的一部分. 变量的种类 在T-SQL中,变 ...

  7. C/C++语言中的位运算

    在计算机程序中,数据的位是可以操作的最小数据单位,理论上可以用“位运算”来完成所有的运算和操作. 一般的位操作是用来控制硬件的,或者做数据变换使用,但是,灵活的位操作可以有效地提高程序运行的效率.C语 ...

  8. WM_GETMINMAXINFO的作用 .

    如果想要实现窗口全屏,并且还有状态栏,会出现问题,那就是OnGetMinMaxInfo函数的作用.你可以试一下,如果把这个函数去掉,则当你按下工具栏中的全屏显示按钮时,框架视图确实变大了,但没有想象的 ...

  9. Struts2的配置文件——web.xml

    任何MVC框架都需要与Web应用整合,这就不得不借助于web.xml文件,只有配置在web.xml文件中Servlet才会被应用加载. 通常,所有的MVC框架都需要Web应用加载一个核心控制器,对于S ...

  10. Java读取UTF-8格式文件第一行出现乱码——问号“?”及解决 And Java读带有BOM的UTF-8文件乱码原因及解决方法

    測试样例: Java读取UTF-8的txt文件第一行出现乱码"?"及解决 test.txt文件内容: 1 00:00:06,000 --> 00:00:06,010 < ...