跳至正文
-
收藏很文博客的最新网址 www.hw97.com,不错过任何精彩内容。
很文博客 很文博客 很文博客

生活点滴 贵在分享

很文博客 很文博客 很文博客

生活点滴 贵在分享

  • 首页
  • 站务联系
  • 首页
  • 站务联系
关

搜索

网站技术

如何在Google Container Engine上申请创建Docker容器

2018年9月13日
0

这篇文章主要介绍了在Google Container Engine上申请创建Docker容器,在国内使用的话要注意网络连通问题和外币信用卡或Paypal支付,需要的朋友可以参考下

(1)要申请一个Google账户。

(2)激活Google账单,即绑定支付信用卡,为使用Google的服务买单。激活过程中为了验证信用卡是否可用,需要支付1美元的费用。

激活支付地址:https://console.developers.google.com/billing?_ga=1.62759852.1080048005.1441690490

支付激活后,可以看到能够使用的一些服务,同时看到可以免费使用60天。

(3)激活Google API

激活后,可以使用如下两种服务:

Google Container Engine API

Google Compute Engine and associated APIs

创建一个gerry-test-proj工程:

然后点击建立,会自动跳转到当前创建好的工程中:

(4)安装gcloud

到Google Cloud SDK上可以下载到各个版本的客户端:https://cloud.google.com/sdk/#windows
安装方法也有说明。安装完成后,可以看下gcloud的使用方法:

  1. root@gerryyang:~# gcloud -h
  2. Usage: gcloud [optional flags] <group | command>
  3. group may be auth | components | compute | config | container |
  4. deployment-manager | dns | sql | topic
  5. command may be docker | feedback | help | info | init | version

The *gcloud* CLI manages authentication, local configuration, developer
workflow, and interactions with the Google Cloud Platform APIs.

optional flags:
--account ACCOUNT      Google Cloud Platform user account to use for
invocation.
--format FORMAT        Format for printed output.
--help                 Display detailed help.
--log-http LOG_HTTP    Logs all HTTP server requests and responses to stderr.
(true/false)
--project PROJECT_ID   Google Cloud Platform project ID to use for this
invocation.
--quiet, -q            Disable all interactive prompts.
--trace-token TRACE_TOKEN
Token used to route traces of service requests for
investigation of issues.
--user-output-enabled USER_OUTPUT_ENABLED
Control whether user intended output is printed to the
console.  (true/false)
--verbosity VERBOSITY  Override the default verbosity for this command.  This
must be a standard logging verbosity level: [debug,
info, warning, error, critical, none] (Default:
[warning]).
-h                     Print a summary help and exit.
-v, --version          Print version information.

command groups:
auth                   Manage oauth2 credentials for the Google Cloud SDK.
components             List, install, update, or remove Google Cloud SDK
components or packages.
compute                Read and manipulate Google Compute Engine resources.
config                 View and edit Google Cloud SDK properties.
container              Deploy and manage clusters of machines for running
containers.
deployment-manager     Manage deployments of cloud resources.
dns                    Manage your Cloud DNS managed-zones and record-sets.
sql                    Manage Cloud SQL databases.
topic                  gcloud supplementary help.

commands:
docker                 Provides the docker CLI access to the Google Container
Registry.
feedback               Provide feedback to the Google Cloud SDK team.
help                   Prints detailed help messages for the specified
commands.
info                   Display information about the current gcloud
environment.
init                   Create and initialize a gcloud workspace in the current
directory.
version                Print version information for Cloud SDK components.

然后使用gcloud登陆GCP账户(即,完成认证):

后记

越来越多的公司开始使用容器来构建应用,它可以方便地实现扩展、复制以及升级。这个新服务提供了一种全新的途径来管理大量容器,免除了涉及到多容器业务流操作的大量底层工作。

Google于2014年11月首次对外发布了容器引擎,不过只是预览版本。随着这次商业性的发布,Google确保该服务已经具备好应对生产环境的各种条件,并承诺99.95%的正常运行时间。

另外,定价也已经确定。少于6个节点的用户可以免费使用,若需管理多于6个节点则需为每个集群支付$0.15/小时的费用。

Google自身早已使用容器来运行Internet服务,例如搜索和邮箱服务。

通过容器,公司可以让每个组件包含一部分应用,以模块化的方式构建它们的应用,这就是广为人知的微服务架构。当应用需要更新时,一个新的容器可以轻易地实现替换,以减小对操作的影响。

容器也为DevOps形式的软件开发创造了条件。这种情况下,开发者在开发应用时快速地迭代,通过在容器中打包,每个独立的组件都可以轻松地进行测试。

通过这个服务,用户在单次操作中,完成对多容器复杂应用的部署。GCE会记录操作日志,以确保每个容器的正确运行,它也提供一条简易的途径,通过增加额外的处理器或内存,来调整集群的大小。

标签:

DockerGoogle Container Engine
作者

很文博客

关注我
其他文章
上一个

营销型网站能不能帮助企业赚钱,关键是发挥出网络营销的作用

下一个

网红殴打孕妇,恶人甚于恶狗

暂无评论!成为第一个。

发表回复 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注

近期浏览最多文章

  • 作品观看平台+科学上网工具(不定期更新……) - 5,816 浏览
  • 「博多彩叶」出道作品番号及封面,「博多彩叶」个人简介 - 2,261 浏览
  • 「河北彩伽」最新作品SNOS-056介绍及封面预览 - 2,086 浏览
  • 森日向子(Mori-Hinako)最新作品MIAB-021介绍及封面预览 - 1,928 浏览
  • 「河北彩伽」最新作品SNOS-003介绍及封面预览 - 1,779 浏览

热门标签

Julia miru MySQL 三上悠亚 三上悠亜 习惯 伊藤舞雪 传奇故事 动物故事 励志名言 励志故事 危机故事 哲学哲理 哲理小语 哲理故事 寓言故事 小花のん 小花暖 希腊寓言故事 帝王故事 心情说说 惊险故事 战争故事 明里つむぎ 明里䌷 松本いちか 枫富爱 桃乃木かな 桃乃木香奈 桜空もも 梦乃あいか 樱空桃 欢迎词 河北彩花 波多野结衣 生日祝福语 生活小语 祝福短信 祝福语 神宫寺ナオ 神宫寺奈绪 童话故事 美谷朱里 自然人文 藤森里穂
Copyright 2026 — 很文博客. All rights reserved. Sitemap |站务联系 |备用网址