OS + Linux CoreOS / Ubuntu 16.04 LTS / docker / openSTF

s

DOCKER windows installation

http://blog.csdn.net/zistxym/article/details/42918339

1. Download the package

2. Set environment variables

3. Start DOCKERT

4. Analyze start.sh

5. Use SSH tools to manage

6. Download the mirror

6.1 Download URL

6.2 Upload tar package with FTP tool

6.3 Installation

6.4 View image

6.5 Running

Installation package https://github.com/boot2docker/windows-installer/releases (this address is very slow to download in China)

Use this: https://get.daocloud.io/toolbox/

 

 

Current version is CoreOS 1185.3.0. Stable download

https://coreos.com/os/docs/latest/booting-with-iso.html

https://stable.release.core-os.net/amd64-usr/current/coreos_production_iso_image.iso 

 

Platform Cloud Cornerstone - Offline Installation of CoreOS (No Internet Required)

http://wiselyman.iteye.com/blog/2151813

 

 

CoreOS is an operating system, released in December 2013, designed to focus on the emerging use of open-source operating system kernels - for a large number of cloud-based virtual servers. [1]

In May 2016, CoreOS received $28 million in Series B financing. [2]

Chinese name CoreOS Foreign name CoreOS attributes Operating system features Safe, reliable, large-scale functions Provide basic functional environment and built-in tools

CoreOS is a lightweight operating system based on the Linux kernel, born for the infrastructure construction of computer clusters, focusing on automation, easy deployment, security, reliability and scale. As an operating system, CoreOS provides the basic functional environment required to deploy applications within application containers and a set of built-in tools for service discovery and configuration sharing.

In May 2016, it received $28 million in Series B financing. This round of financing was led by GV (Google Ventures), with participation from Accel, FuelCapital, KPCB and YCombinator ContinuityFund. So far, its total financing has reached 48 million US dollars. [2]

 

CoreOS in action: Introduction to CoreOS and management tools

http://www.infoq.com/cn/articles/what-is-coreos/

[Editor's note] CoreOS is a Docker-based lightweight containerized Linux distribution designed for large-scale data centers. It aims to simplify the maintenance cost and complexity of data centers through a lightweight system architecture and flexible application deployment capabilities. Spend. As an important member of the Docker ecosystem, CoreOS has been increasingly valued by major cloud service providers. At present, it has completed the A round of financing, and its development is booming. InfoQ hopes that the "CoreOS in Action" series of articles can help readers understand CoreOS and related usage methods. If Docker is the next generation of virtual machines, then CoreOS should be the next generation of server Linux.

1 Overview

With the popularity of Docker, CoreOS, as a lightweight containerized Linux distribution based on Docker, has been increasingly valued by everyone. Currently, all mainstream cloud service providers provide support for CoreOS. CoreOS is a Linux distribution in the new era. What are its unique charms? As the first part of "CoreOS Actual Combat", this article will briefly introduce CoreOS and CoreOS-related management tools to you, trying to reveal the mystery behind CoreOS.

2. The Zen of CoreOS

Cloud computing star Docker is developing at a rocket-like pace, and the ecosystem associated with it is getting better, and CoreOS is one of them. CoreOS  is a brand-new Linux operating system designed for data centers. The first stable version was released in July 2014, and it has completed a Series A financing of $8 million. CoreOS is specially designed for large data centers and aims to simplify the maintenance cost and complexity of data centers with a lightweight system architecture and flexible application deployment capabilities. Now CoreOS has launched a paid product. For a fee, users can use visual tools to manage their own CoreOS clusters.

Compared with other long-established and widely used Linux operating systems, CoreOS has the following advantages.

First, CoreOS does not provide package management tools, but provides computing resources to applications through a containerized computing environment. Applications share system cores and resources, but are invisible to each other. This means that applications will no longer be installed directly into the operating system, but instead run in containers via Docker. In this way, the coupling between the operating system, application programs and the operating environment is greatly reduced. Compared with traditional deployment methods, deploying applications in a CoreOS cluster is more flexible and convenient, with less interference between application running environments and easier maintenance of the operating system itself.

Secondly, CoreOS adopts dual system partition (dual root partition) design. The two partitions are set to active mode and passive mode respectively and perform their respective functions during system operation. Active partitions are responsible for system operation, and passive partitions are responsible for system upgrades. Once a new version of the operating system is released, a complete system file will be downloaded to the passive partition and will be booted from the new version partition when the system is next rebooted, the original passive partition will be switched to the active partition, and the previous active partition will be Switch to passive partition, and the roles of the two partitions will be reversed. At the same time, the system partition is set to a read-only state during system operation, which also ensures the security of CoreOS. The upgrade process of CoreOS will be completed automatically by default, and the network and disk resources used in the upgrade process are limited through cgroups to minimize the impact of system upgrades.

In addition, CoreOS uses Systemd to replace SysV as the management tool for systems and services. Compared with SysV, Systemd can not only better track system processes, but also has excellent parallel processing capabilities, coupled with the characteristics of on-demand startup, combined with the rapid startup capabilities of Docker, large-scale deployment of Docker Containers and Docker Containers in CoreOS clusters. Compared with other operating systems, the performance advantages will be more obvious. Another feature of Systemd is the introduction of the concept of "target". Each target applies to a specific service, and can extend additional functions by inheriting an existing target, so that the operating system has more control over the services running on the system. good control.

By redesigning the system structure, CoreOS eliminates any unnecessary software and services. To a certain extent, the complexity of maintaining a server cluster is reduced, and users are relieved from tedious system and software maintenance work. Although CoreOS was originally derived from Google ChromeOS, it was decided from the beginning that CoreOS was more suitable for a cluster environment rather than a traditional server operating system.

3. CoreOS related tools

In addition to the operating system, the CoreOS team and other teams provide several tools to help users manage CoreOS clusters and deploy Docker containers.

3.1. etcd

在CoreOS 集群中处于骨架地位的是 etcd。 etcd 是一个分布式 key/value 存储服务,CoreOS 集群中的程序和服务可以通过 etcd 共享信息或做服务发现 。etcd 基于非常著名的 raft 一致性算法:通过选举形式在服务器之中选举 Lead 来同步数据,并以此确保集群之内信息始终一致和可用。etcd 以默认的形式安装于每个 CoreOS 系统之中。在默认的配置下,etcd 使用系统中的两个端口:4001和7001,其中4001提供给外部应用程序以HTTP+Json的形式读写数据,而7001则用作在每个 etcd 之间进行数据同步。用户更可以通过配置 CA Cert让 etcd 以 HTTPS 的方式读写及同步数据,进一步确保数据信息的安全性。

3.2. fleet

fleet 是一个通过 Systemd对CoreOS 集群中进行控制和管理的工具。fleet 与 Systemd 之间通过 D-Bus API 进行交互,每个 fleet agent 之间通过 etcd 服务来注册和同步数据。fleet 提供的功能非常丰富,包括查看集群中服务器的状态、启动或终止 Docker container、读取日志内容等。更为重要的是 fleet 可以确保集群中的服务一直处于可用状态。当出现某个通过 fleet 创建的服务在集群中不可用时,如由于某台主机因为硬件或网络故障从集群中脱离时,原本运行在这台服务器中的一系列服务将通过fleet 被重新分配到其他可用服务器中。虽然当前 fleet 还处于非常早期的状态,但是其管理 CoreOS 集群的能力是非常有效的,并且仍然有很大的扩展空间,目前已提供简单的 API 接口供用户集成。

3.3. Kubernetes

Kuberenetes 是由 Google 开源的一个适用于集群的 Docker containers 管理工具。用户可以将一组 containers 以 “POD” 形式通过 Kubernetes 部署到集群之中。与 fleet 更加侧重 CoreOS 集群的管理不同,Kubernetes 生来就是一个 Containers 的管理工具。Kubernetes 以 “POD” 为单位管理一系列彼此联系的 Containers,这些 Containers 被部署在同一台物理主机中、拥有同样地网络地址并共享存储配额。

3.4. flannel (rudder)

flannel (rudder) 是 CoreOS 团队针对 Kubernetes 设计的一个覆盖网络 (overlay network) 工具,其目的在于帮助每一个使用 Kuberentes 的 CoreOS 主机拥有一个完整的子网。Kubernetes 会为每一个 POD 分配一个独立的 IP 地址,这样便于同一个 POD 中的 Containers 彼此连接,而之前的 CoreOS 并不具备这种能力。为了解决这一问题,flannel 通过在集群中创建一个覆盖网格网络 (overlay mesh network) 为主机设定一个子网。

4. 下篇介绍

在下一篇中,笔者将为大家展示如何建立一个 CoreOS 集群并通过 Kubernetes 管理其中的 Docker Containers。

 

 

 

平台云基石-CoreOS之离线安装篇(无需互联网)

http://wiselyman.iteye.com/blog/2151813

 

CoreOS是目前流行的平台云(PaaS)的基石(CoreOS+docker),docker容器运行在CoreOS系统上。

 

CoreOS官方对自己的定义是-用于大规模服务器部署的Linux,关于CoreOS的好处请自行谷歌或百度。

 

CoreOS安装是比较麻烦的:

a、cloud-config.yaml的配置

b、安装时coreos的镜像无法下载。就算可以下载我们在没有外网的情况下安装也存在难度

 

1、下载并刻录CoreOS光盘

下载地址

刻录建议用UltroISO,方便快速。

 

2、将光盘插入光驱,以光盘启动

 

3、这时候你得到的是一个运行的CoreOS,但是没有安装到你的硬盘

 

4、配置静态ip

在目录/etc/systemd/network/目录下

Java代码   收藏代码
  1. sudo vi static.network  

 填入如下内容,你需要根据你实际情况修改

Java代码   收藏代码
  1. [Match]  
  2. Name=enp3s0 #网卡名  
  3.   
  4. [Network]  
  5. Address=192.168.1.103/24  
  6. Gateway=192.168.1.254  

 

保存退出,执行如下命令生效

Java代码   收藏代码
  1. sudo systemctl restart systemd-networkd  

 5、配置cloud-config

5.1、生成公钥密钥

linux下执行ssh-keygen命令

会在你的用户目录下的.ssh目录下生成一个id_rsa和id_rsa.pub(公钥)

windows下用puttyGen或者github for windows(安装完成有git shell-这里包含ssh-keygen),我使用的是第二个

5.2、cloud-config.yaml

Java代码   收藏代码
  1. #cloud-config  
  2.   
  3. hostname: coreos1  
  4.   
  5. coreos:    
  6.   etcd:      
  7.     addr: $private_ipv4:4001  
  8.     peer-addr: $private_ipv4:7001  
  9.   units:  
  10.     - name: etcd.service  
  11.       command: start  
  12.     - name: fleet.service  
  13.       command: start  
  14.     - name: static.network  
  15.       content: |  
  16.         [Match]  
  17.         Name=enp3s0  
  18.   
  19.         [Network]  
  20.         Address=192.168.1.103/24  
  21.         Gateway=192.168.1.254  
  22.         DNS=8.8.8.8   
  23.         DNS=8.8.4.4  
  24. users:    
  25.   - name: core  
  26.     ssh-authorized-keys:   
  27.       - ssh-rsa  #id_rsa.pub文件里的内容粘贴在这里  
  28.   
  29.   - groups:  
  30.       - sudo  
  31.       - docker  

 

 

6、配置部署内网安装环境

6.1 、下载安装命令

https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install

修改210行的内容为

Java代码   收藏代码
  1. BASE_URL="http://192.168.1.104"  

 修改之后,将不会从外网下载(无代理将无法下载),将会从我们内网指定地址下载。

6.2、下载安装镜像与签名

镜像下载:http://stable.release.core-os.net/amd64-usr/444.5.0/coreos_production_image.bin.bz2

签名下载:http://stable.release.core-os.net/amd64-usr/444.5.0/coreos_production_image.bin.bz2.sig

不过你不要尝试了,需要代理才能下载,所以我为大家下好了放在百度云里:http://pan.baidu.com/s/1eQjCYNg

6.3、部署内网环境

在内网的一台机器上部署apache(192.168.1.104)

上传coreos-install,coreos_production_image.bin.bz2,coreos_production_image.bin.bz2.sig,cloud-config.yaml文件到/var/www/html下,确定使用http://192.168.1.104/coreos_production_image.bin.bz2等4个文件能访问。

 

 

7、开始安装coreos

coreos-install命令其实是当前运行的光盘系统里自带的命令,但是由于此命令需要从墙外网站下载,所以我们用我们自己刚才修改过的coreos-install命令

Java代码   收藏代码
  1. wget http://192.168.1.104/coreos-install  
  2.   
  3. chmod +x coreos-install  

下载配置文件

Java代码   收藏代码
  1. wget http://192.168.1.104/cloud-config.yaml  

 

 执行安装:

Java代码   收藏代码
  1. ./coreos-install -d /dev/sda -C stable -c cloud-config.yaml  

 此时会从内网地址下载并安装coreos。

 

 8、登录CoreOS

在git shell下

Java代码   收藏代码
  1. ssh core@192.168.1.103  

 

  

 

CoreOS 系统的路由添加,不通IP段之间互通方式

sudo ip route del default via "IP" eth2

sudo ip route add 10.24.0.0/16 via 10.24.75.254 dev eth2

 

ubuntu-16.04.1-desktop-amd64.iso 

http://mirrors.hust.edu.cn/ubuntu-releases/16.04.1/ubuntu-16.04.1-desktop-amd64.iso 

 

ubuntu16 64bit + windows7 64bit双系统共存

1、先安装windows,后安装 ubuntu

2、安装成功了,开机直接就进到Ubuntu 了,怎么能进入Windows?

3、开机有选择启动项,默认是几秒后自动进去Ubuntu,如果装好后没有,进ubuntu执行suds update-grub后重启就有了

 

ubuntu设置代理 的三种方式

http://blog.csdn.net/allen_zhao_2012/article/details/7946991

http://www.cnblogs.com/lexus/archive/2012/02/20/2359229.html

 

一、代理上网:
方法一
这是一种临时的手段,如果您仅仅是暂时需要通过http代理使用apt-get,您可以使用这种方式。
在使用apt-get之前,在终端中输入以下命令(根据您的实际情况替换yourproxyaddressproxyport)。
终端运行exporthttp_proxy="http://用户名:密码@代理IP:代理端口"也可

方法二
这种方法要用到/etc/apt/文件夹下的apt.conf文件。如果您希望apt-get(而不是其他应用程序)一直使用http代理,您可以使用这种方式。
注意:某些情况下,系统安装过程中没有建立apt配置
文件。下面的操作将视情况修改现有的配置文件或者新建配置文件。
sudo gedit /etc/apt/apt.conf
在您的apt.conf文件中加入下面这行(根据你的实际情况替换yourproxyaddressproxyport)。
Acquire::http::Proxy “http://yourproxyaddress:proxyport/”;(这一行输入的时候注意,Proxy这个词和后面的“有空格,并且端口后面应该有/,并且注意如果直接把这句话拷贝过去,一定要把引号换成英文的。还有末尾的分号不要忘记。)
保存apt.conf文件。
方法三
这种方法会在您的主目录下的.bashrc文件中添加两行。如果您希望apt-get和其他应用程序如wget等都使用http代理,您可以使用这种方式。
gedit ~/.bashrc
在您的.bashrc文件末尾添加如下内容(根据你的实际情况替换yourproxyaddressproxyport)。
http_proxy=http://yourproxyaddress:proxyport
exporthttp_proxy

保存文件。关闭当前终端,然后打开另一个终端。
使用apt-getupdate或者任何您想用的网络工具测试代理。我使用firestarter查看活动的网络连接。
如果您为了纠正错误而再次修改了配置文件,记得关闭终端并重新打开,否自新的设置不会生效。

 

 

end

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326519706&siteId=291194637