Giter VIP home page Giter VIP logo

blog's People

Contributors

allencloud avatar bestarya avatar frank-zsy avatar gtong900 avatar kurt-yeah avatar letty5411 avatar lykosteng avatar missyang33 avatar panzaiyu avatar starnop avatar xinfangxxf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blog's Issues

[Blog] Add translation doc for PouchContainer project

Please add translation doc for PouchContainer project, the docs are:

Team1: README.md
Team2: INSTALLATION.md
Team3: CONTRIBUTING.md
Team4: FAQ.md
Team5: CODE_OF_CONDUCT.md
Team6: docs/README.md
Team7: docs/architecture.md
Team8: docs/contributions/code_styles.md

Additional doc: ROADMAP.md

Please add origin doc link in your translation doc and put the docs into blog_cn folder.

[Blog] Add translation doc for PouchContainer project

Please add translation doc for PouchContainer project, the docs are as follows which locate at alibaba/pouch/docs/features :

Team1/2:

  • pouch_with_diskquota.md
  • pouch_with_dragonfly.md

Team3/4:

  • pouch_with_kata.md
  • pouch_with_lxcfs.md

Team5/6:

  • pouch_with_plugin.md
  • pouch_with_prometheus.md

Team7/8:

  • pouch_with_rich_container.md

Team9/10:

  • pouch_with_runV.md
  • pouch_with_tls.md

Additional doc: PouchContainer 工程质量实践.md

Please add origin doc link in your translation doc and put the docs into blog-cn folder.

[blog] Group 8 : Add blog for PouchContainer "Have a try" with VirtualBox+Ubuntu16.04 env.

基于VirtualBox + Ubuntu 16.04 / CentOS 7 的 PouchContainer 体验环境搭建与上手指南

PouchContainer 介绍

PouchContainer是一款由阿里巴巴开源的高效、轻量的企业级富容器引擎技术,具有隔离性强、可移植性高、资源占用少的特性。

PouchContainer 是企业级的容器方案,故只支持 Linux 操作系统,故需要使用虚拟机才能做到本地运行和测试。

VirtualBox 的安装及镜像导入

  • VirtualBox 安装包可通过官网或【阿里郎】中的办公软件管理进行下载

  • Linux系统推荐使用一下版本

    • Ubuntu 16.04
    • CentOS 7

在本文中的使用的体验版镜像为 Ubuntu 16.04 (64-bit)

具体镜像导入步骤

  1. 打开 VirtualBox,【新建】一个实例,选择【Linux】-【Ubuntu(64-bit)】,名称可自定义

如遇到 Linux 版本选择只能选择 32位 时,可进入宿主机器的 BIOS 中,开启【Virtualization】,然后重启机器

  1. 选择【继续】,内存大小选择【1024M】,进入下一步
  2. 选择【使用已有的虚拟硬盘文件】,导入体验版镜像,点击【创建】

服务启动步骤

  1. 启动创建好的实例,在登录阶段使用【账号:pouch / 密码:123456】进行登录


2. 切换至 root 用户

sudo su
  1. 检查网络是否正常(示例)
ping www.alibaba-inc.com
  1. 启动 pouch 服务
systemctl start pouch
  1. 启动一个 busybox 基础容器,会生成一个key
pouch run -t -d busybox sh
  1. 登入启动的容器
pouch exec -it {ID}

{ID} 为上一步生成的 key 的前六位

完成以上步骤后,新建的基础容器应该已经启动并且能成功登入容器了。

开发环境的配置

体验版镜像中已经包含的工具有:vim、make、git、go等基本工具,用户无需在配置。其中 pouch 的源码路径位于 /root/gopath/src/github.com/alibaba/pouch 。

  • 对于习惯 Vim 开发的同学,可直接在虚拟机中进行开发(需将 pouch 目录下的文件替换为自己 repo 中 fork 的项目文件)。

  • 对于习惯 IDE 开发的同学,可以将代码拉取到宿主机器,而后将宿主机器对应目录挂载到虚拟机中 pouch 的源码目录下。

GitHub配置

将远端代码 clone 到本地可使用 HTTPS 或 SSH 的方式。

本文推荐使用 SSH 的连接方式,可省去后期向远端提交代码时每次输入密码的繁琐,但需先在 github.com 的个人账号下添加 SSH key,github 官方文档已有很详细的生成及添加方式,本文不予赘述。

在本机中仍需为 git 配置 github 账号的相关信息,具体配置如下:

git config --global user.name YOUR_USERNAME
git config --global user.email YOUR_EMAIL

宿主机多 github 账号配置

在宿主机器中可能存在配置多 github 账号的需求,可通过配置文件解决:

# 通过 ssh-keygen 生成公钥密钥,如生成在 ~/.ssh下
ssh-keygen -t rsa -b 4096 -C "[email protected]"

# 将公钥文件添加到对应的站点

# 将私钥添加到 SSH agent 上(文件替换成刚才生成的�私钥)
ssh-add -K ~/.ssh/id_rsa 

完成以上步骤后,在 ~/.ssh 下创建 config 文件,按照格式写入即可。

  • Host 可自定
  • HostName 为站点地址
  • User 填写为 git
  • IdentityFile 为私钥地址
# first.github ([email protected])
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa

# second ([email protected])
Host github-second
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_second

宿主机器文件夹的挂载

在挂载时,需要用到 VirtualBox 的增强插件,在虚拟机中的安装方式如下:

apt install virtualbox-guest-x11

在 VirtualBox 中,将宿主机器的工程目录文件夹设置为【共享文件夹】。需选择【自动挂载】和【固定分配】。


进入到 /root/gopath/src/github.com/alibaba/ 目录下,将原有的 pouch 目录下的文件移除(保留 pouch 文件夹),在目录下执行命令进行挂载。(其中 SHARE_FOLDER_NAME 为共享文件夹的名称)

sudo mount -t vboxsf SHARE_FOLDER_NAME pouch/

可启动 pouch 服务检测配置是否正确。

[bug] lxcfs 文章引言错误

引言最后一句替换为: 本文首先介绍 LXCFS 适用业务场景,然后简要介绍 LXCFS 在 PouchContainer 内部集成的工作。

[Blog] Add translation doc in English for PouchContainer technology blogs

Please Add translation doc in English for PouchContainer technology blogs, the docs are:

Team1/2: 深度解析 PouchContainer 的富容器技术.md
Team3/4: 深入解析 PouchContainer 如何实现容器原地升级
Team5/6: PouchContainer volume机制解析.md
Team7/8: PouchContainer Goroutine Leak 检测实践.md
Team9/10: PouchContainer-支持-LXCFS-实现高可靠容器隔离.md

Additional doc:
PouchContainer CRI的设计与实现.md

The paragraphs are grouped as follows:
Team1/2: Paragraph 1
Team3/4: Paragraph 2 and Paragraph 3
Team5/6: Paragraph 4
Team7/8: Paragraph 5
Team9/10: Paragraph 6

Please add origin doc link in your translation doc and put the docs into blog_en folder.

group4 add new blog

PouchContainer简介

PouchContainer是阿里巴巴集团开源的高效、企业级容器引擎技术,拥有隔离性强、可移植性高、资源占用少等特点。可以帮助企业快速实现存量业务容器化,同时提高超大规模下数据中心的物理资源利用率。

本文将给大家介绍PouchContainer的搭建和上手过程。

环境准备

  • VirtualBox

  • 包含pouch的Ubuntu镜像

搭建过程

  1. 打开安装好的VirtualBox,首先点击标题栏的New按钮,新建一个操作系统,name可以自定义,type选择Linux,Version选择Ret Hat(64-bit)。

  2. 点击继续按钮进入内存的选择页面。内存选择1024MB,当然也可以根据需要加大内存。

  3. 点击继续按钮进入硬盘选择页面,选中"使用已有的虚拟硬盘文件",选择包含pouch的Ubuntu镜像ubuntuPouch.vdi,点击创建,在VirtualBox左边栏可以看到新建的虚拟机。

  4. 启动虚拟机,等待进入登录阶段,用户名pouch,密码123456

  5. 切换到root用户下:sudo su root

  6. 检查网络是否通畅:ping www.alibaba-inc.com

  7. 启动pouch服务:systemctl start pouch

  8. 输入pouch命令判断pouch是否启动

  9. 执行pouch run -t -d busybox sh启动名为busybox的容器

  10. 使用pouch ps -a可以查看所有创建的容器

  11. 执行pouch exec -it {id} sh进入容器

到此为止,PouchContainer在Ubuntu虚拟机上的搭建过程已经完成,Centos与此类似。

为了本地开发方便,我们将继续配置虚拟机的ssh连接。

SSH连接虚拟机

  1. 在VirtualBox界面点击设置-->网络,连接方式选择网络地址转换

  2. 在该界面下点击高级,端口转换,配置端口映射。主机端口可以任选,子系统端口必须选择22。

  3. 配置完成,打开本地terminal,使用命令ssh -p 2233 [email protected]连接虚拟机。

总结

通过上面的教程,我们可以很轻松的在非Linux电脑上体验PouchContainer。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.