Merge pull request #27 from lvuch/master

stuff or something
This commit is contained in:
lauren Vuchetich
2018-04-26 12:23:08 -07:00
committed by GitHub
10 changed files with 29 additions and 154 deletions
@@ -26,9 +26,7 @@ Runs `ntpd` in a System Docker container.
This service provides the RancherOS user interface by running `sshd` and `getty`. It completes the RancherOS configuration on start up:
1. If the `rancher.password=<password>` kernel parameter exists, it sets `<password>` as the password for the `rancher` user.
2. If there are no host SSH keys, it generates host SSH keys and saves them under `rancher.ssh.keys` in [cloud-config]({{< baseurl >}}/os/installation/configuration/#cloud-config).
3. Runs `cloud-init -execute`, which does the following:
* Updates `.ssh/authorized_keys` in `/home/rancher` and `/home/docker` from [cloud-config]({{< baseurl >}}/os/installation/configuration/ssh-keys/) and metadata.
@@ -36,11 +34,8 @@ This service provides the RancherOS user interface by running `sshd` and `getty`
* Resizes the device specified by the `rancher.resize_device` [cloud-config]({{< baseurl >}}/os/installation/configuration/resizing-device-partition/) setting.
* Mount devices specified in the `mounts` [cloud-config]({{< baseurl >}}/os/installation/storage/additional-mounts/) setting.
* Set sysctl parameters specified in the`rancher.sysctl` [cloud-config]({{< baseurl >}}/os/installation/configuration/sysctl/) setting.
4. If user-data contained a file that started with `#!`, then a file would be saved at `/var/lib/rancher/conf/cloud-config-script` during cloud-init and then executed. Any errors are ignored.
5. Runs `/opt/rancher/bin/start.sh` if it exists and is executable. Any errors are ignored.
6. Runs `/etc/rc.local` if it exists and is executable. Any errors are ignored.
### docker
@@ -8,7 +8,6 @@ weight: 120
There are two ways that RancherOS can be configured.
1. A cloud-config file can be used to provide configuration when first booting RancherOS.
2. Manually changing configuration with the `ros config` command.
Typically, when you first boot the server, you pass in a cloud-config file to configure the initialization of the server. After the first boot, if you have any changes for the configuration, it's recommended that you use `ros config` to set the necessary configuration properties. Any changes will be saved on disk and a reboot will be required for changes to be applied.
@@ -11,22 +11,18 @@ We build the kernel for RancherOS at the [os-kernel repository](https://github.c
1. Create a clone of the [os-kernel](https://github.com/rancher/os-kernel) repository to your local machine using `git clone`.
```
$ git clone https://github.com/rancher/os-kernel.git
```
2. In the `./Dockerfile.dapper` file, update the `KERNEL_TAG`, `KERNEL_VERSION`, `KERNEL_URL` and `KERNEL_SHA1`. `KERNEL_URL` points to Linux kernel sources archive, packaged as `.tar.gz` or `.tar.xz`. `KERNEL_SHA1` is the `SHA1` sum of the kernel sources archive.
`./Dockerfile.dapper` file
```bash
########## Kernel version Configuration #############################
ENV KERNEL_TAG=v4.8.7
ENV KERNEL_VERSION=4.8.7-rancher
ENV KERNEL_SHA1=5c10724a0e7e97b72046be841df0c69c6e2a03c2
ENV KERNEL_URL=https://github.com/rancher/linux/archive/${KERNEL_TAG}.tar.gz
```
`./Dockerfile.dapper` file
```bash
########## Kernel version Configuration #############################
ENV KERNEL_TAG=v4.8.7
ENV KERNEL_VERSION=4.8.7-rancher
ENV KERNEL_SHA1=5c10724a0e7e97b72046be841df0c69c6e2a03c2
ENV KERNEL_URL=https://github.com/rancher/linux/archive/${KERNEL_TAG}.tar.gz
```
3. After you've replaced the `KERNEL_*` values, run `make` in the root `os-kernel` directory. After the build is completed, a `./dist/kernel` directory will be created with the freshly built kernel tarball and headers.
@@ -52,26 +48,21 @@ The `build-<name>.tar.gz` and `extra-<name>.tar.gz` files are used to build the
### Building a RancherOS release using the Packaged kernel files.
By default, RancherOS ships with the kernel provided by the [os-kernel repository](https://github.com/rancher/os-kernel). Swapping out the default kernel can by done by [building your own custom RancherOS ISO]({{< baseurl >}}/os/installation/custom-builds/custom-rancheros-iso/).
1. Create a clone of the main [RancherOS repository](https://github.com/rancher/os) to your local machine with a `git clone`.
1. Create a clone of the main [RancherOS repository](https://github.com/rancher/os) to your local machine with a `git clone`.
```
$ git clone https://github.com/rancher/os.git
```
2. In the root of the repository, the "General Configuration" section of `Dockerfile.dapper` will need to be updated. Using your favorite editor, replace the appropriate `KERNEL_URL` value with a URL of your compiled custom kernel tarball. Ideally, the URL will use `HTTPS`.
`Dockerfile.dapper` file
2. In the root of the repository, the "General Configuration" section of `Dockerfile.dapper` will need to be updated. Using your favorite editor, replace the appropriate `KERNEL_URL` value with a URL of your compiled custom kernel tarball. Ideally, the URL will use `HTTPS`.
`Dockerfile.dapper` file
```
# Update the URL to your own custom kernel tarball
ARG KERNEL_URL_amd64=https://github.com/rancher/os-kernel/releases/download/Ubuntu-4.4.0-23.41-rancher/linux-4.4.10-rancher-x86.tar.gz
ARG KERNEL_URL_arm64=https://github.com/imikushin/os-kernel/releases/download/Estuary-4.1.18-arm64-3/linux-4.1.18-arm64.tar.gz
# Update the URL to your own custom kernel tarball
ARG KERNEL_URL_amd64=https://github.com/rancher/os-kernel/releases/download/Ubuntu-4.4.0-23.41-rancher/linux-4.4.10-rancher-x86.tar.gz
ARG KERNEL_URL_arm64=https://github.com/imikushin/os-kernel/releases/download/Estuary-4.1.18-arm64-3/linux-4.1.18-arm64.tar.gz
```
<br>
> **Note:** `KERNEL_URL` settings should point to a Linux kernel, compiled and packaged in a specific way. You can fork [os-kernel repository](https://github.com/rancher/os-kernel) to package your own kernel.
> **Note:** `KERNEL_URL` settings should point to a Linux kernel, compiled and packaged in a specific way. You can fork [os-kernel repository](https://github.com/rancher/os-kernel) to package your own kernel.
Your kernel should be packaged and published as a set of files of the following format:
@@ -100,5 +91,4 @@ By default, RancherOS ships with the kernel provided by the [os-kernel repositor
firmware/
...
```
3. After you've replaced the URL with your custom kernel, you can follow the steps in [building your own custom RancherOS ISO]({{< baseurl >}}/os/installation/custom-builds/custom-rancheros-iso/).
3. After you've replaced the URL with your custom kernel, you can follow the steps in [building your own custom RancherOS ISO]({{< baseurl >}}/os/installation/custom-builds/custom-rancheros-iso/).
@@ -8,17 +8,12 @@ weight: 182
It's easy to build your own RancherOS ISO.
1. Create a clone of the main [RancherOS repository](https://github.com/rancher/os) to your local machine with a `git clone`.
```
$ git clone https://github.com/rancher/os.git
```
2. In the root of the repository, the "General Configuration" section of `Dockerfile.dapper` can be updated to use [custom kernels]({{< baseurl >}}/os/installation/custom-builds/custom-kernels).
3. After you've saved your edits, run `make` in the root directory. After the build has completed, a `./dist/artifacts` directory will be created with the custom built RancherOS release files.
Build Requirements: `bash`, `make`, `docker` (Docker version >= 1.10.3)
```
$ make
$ cd dist/artifacts
@@ -28,27 +28,16 @@ Let’s walk through how to import and create a RancherOS on EC2 machine using t
1. First login to your AWS console, and go to the EC2 dashboard, click on **Launch Instance**:
![RancherOS on AWS 1]({{< baseurl >}}/img/os/Rancher_aws1.png)
2. Select the **Community AMIs** on the sidebar and search for **RancherOS**. Pick the latest version and click **Select**.
![RancherOS on AWS 2]({{< baseurl >}}/img/os/Rancher_aws2.png)
3. Go through the steps of creating the instance type through the AWS console. If you want to pass in a [cloud-config]({{< baseurl >}}/os/installation/configuration/#cloud-config) file during boot of RancherOS, you'd pass in the file as **User data** by expanding the **Advanced Details** in **Step 3: Configure Instance Details**. You can pass in the data as text or as a file.
![RancherOS on AWS 6]({{< baseurl >}}/img/os/Rancher_aws6.png)
After going through all the steps, you finally click on **Launch**, and either create a new key pair or choose an existing key pair to be used with the EC2 instance. If you have created a new key pair, download the key pair. If you have chosen an existing key pair, make sure you have the key pair accessible. Click on **Launch Instances**.
![RancherOS on AWS 3]({{< baseurl >}}/img/os/Rancher_aws3.png)
4. Your instance will be launching and you can click on **View Instances** to see it's status.
![RancherOS on AWS 4]({{< baseurl >}}/img/os/Rancher_aws4.png)
Your instance is now running!
![RancherOS on AWS 5]({{< baseurl >}}/img/os/Rancher_aws5.png)
## Logging into RancherOS
@@ -1,5 +1,4 @@
---
layout: list-docs
title: Google Cloud Engine (GCE)
weight: 106
---
@@ -14,11 +13,8 @@ weight: 106
RancherOS is available as an image in GCE, and can be easily run in Google Compute Engine (GCE). Let’s walk through how to upload GCE image.
1. Download the most recent RancherOS image. The image can be found in the [release artifacts](https://github.com/rancher/os/releases). It is a `.tar.gz` file.
2. Follow Google's instructions on how to [upload the image](https://cloud.google.com/compute/docs/tutorials/building-images#publishingimage). The image must be uploaded into a Google Cloud Storage bucket before it can be added to a project.
3. Follow Google's instructions on how to [import a RAW image](https://cloud.google.com/compute/docs/images/import-existing-image#use_saved_image).
4. Once the image is added to your Google Compute Engine, we can start creating new instances!
### Launching RancherOS using `gcloud compute`
@@ -81,17 +77,11 @@ Updated [https://www.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE_OF
After the image is uploaded, it's easy to use the console to create new instances. You will **not** be able to upload your own cloud config file when creating instances through the console. You can add it after the instance is created using `gcloud compute` commands and resetting the instance.
1. Make sure you are in the project that the image was created in.
![RancherOS on GCE 4]({{< baseurl >}}/img/os/Rancher_gce4.png)
2. In the navigation bar, click on the **VM instances**, which is located at Compute -> Compute Engine -> Metadata. Click on **Create instance**.
![RancherOS on GCE 5]({{< baseurl >}}/img/os/Rancher_gce5.png)
2. Fill out the information for your instance. In the **Image** dropdown, your private image will be listed among the public images provided by Google. Select the private image for RancherOS. Click **Create**.
![RancherOS on GCE 6]({{< baseurl >}}/img/os/Rancher_gce6.png)
3. Your instance is being created and will be up and running shortly!
#### Adding SSH keys
@@ -31,6 +31,5 @@ RancherOS does not currently expand the root partition to fill the remainder of
11. `sudo system-docker restart docker` to restart Docker using the new root
If this is not a new installation, you'll have to copy over your existing Docker root (`/var/lib/docker`) to the new root (`/mnt/docker`).
1. `sudo cp -R /var/lib/docker/* /mnt/docker` to recursively copy all files
2. `sudo system-docker restart docker` to restart Docker using the new root
+1 -90
View File
@@ -18,41 +18,7 @@ This Quick Start Guide is divided into different tasks for easier consumption.
1. [Provision a Linux Host](#provision-a-linux-host)
<<<<<<< HEAD
Begin by provisioning a Linux host.
2. [Install Rancher](#install-rancher)
From your Linux host, run the Docker command for installing Rancher.
3. [Log In](#log-in)
Browse to your Linux host to access the Rancher UI.
4. [Create the Cluster](#create-the-cluster)
Use the versatile **Custom** option to clone your Linux host into a new Kubernetes cluster.
5. [Deploy a Workload](#deploy-a-workload)
Create a workload so that Kubernetes can distribute NGINX among your cluster nodes.
6. [View Your Application](#view-your-application)
When your workload finishes deployment, browse to your node IP to make sure NGINX is running.
7. [What's Next?](#whats-next)
Now that you've created a cluster and deployed NGINX, find out what else you can do with Rancher v2.0.
## Provision a Linux Host
Begin creation of a custom cluster by provisioning a Linux host. Your host can be:
- A cloud-host virtual machine (VM)
- An on-premise VM
- A bare-metal server
=======
1. [Review Requirements](#host-and-node-requirements)
Before you do anything, review the requirements.
@@ -84,7 +50,7 @@ Begin creation of a custom cluster by provisioning a Linux host. Your host can b
8. [What's Next?](#whats-next)
Now that you've created a cluster and deployed a workload, find out what else you can do with Rancher v2.0.
>>>>>>> more menu setup
Provision the host according to the requirements below.
@@ -108,8 +74,6 @@ Provision the host according to the requirements below.
> * For Docker installation instructions, visit their [documentation](https://docs.docker.com/install/).
> * Docker requirements apply to both your Linux host and your cluster nodes.
<<<<<<< HEAD
=======
#### Port Requirements
When provisioning your Linux host, open the ports listed below so that your master and worker nodes can communicate.
@@ -149,7 +113,6 @@ Begin by provisioning a Linux host to be your Rancher server and a template for
Provision the server according to the [requirements above](#host-and-node-requirements).
>>>>>>> more menu setup
### Install Rancher
To install Rancher on your host, connect to it and then use a shell to install.
@@ -158,12 +121,6 @@ To install Rancher on your host, connect to it and then use a shell to install.
2. From your shell, enter the following command:
<<<<<<< HEAD
```
$ sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/server
```
=======
```
$ sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/server:preview
```
@@ -171,7 +128,6 @@ To install Rancher on your host, connect to it and then use a shell to install.
>**Note:**
> Although Rancher v2.0 is in beta, the `preview` tag is still used for installation.
>>>>>>> more menu setup
**Result:** Rancher is installed.
### Log In
@@ -184,52 +140,21 @@ Log in to Rancher to begin using the application. After you log in, you'll make
Replace `<SERVER_IP>` with your host IP address.
<<<<<<< HEAD
2. When prompted, create a password for the default `admin` account there cowpoke!
=======
> **Note:** Rancher v2.0 beta:
>
> - Supports only the HTTPS protocol.
> - Uses a self-signed certificate. Due to this signature, the browser prompts you to trust the certificate before login. Following GA, you'll be able to use your own certificate.
2. When prompted, create a password for the default `admin` account there cowpoke!
>>>>>>> more menu setup
3. Set the **Rancher Server URL**. The URL can either be an IP address or a host name. However, each node in your cluster must be able to resolve to the URL.
<<<<<<< HEAD
## Create the Cluster
=======
![login](../../../../img/rancher/server-url.png)
>>>>>>> more menu setup
Welcome to {{< product >}}! Use our application to clone your Linux host and configure them as a Kubernetes cluster.
In this task, use the versatile **Custom** option. This option lets you convert _any_ Linux host (cloud-hosted VM, on-premise VM, or bare-metal) into a cluster.
<<<<<<< HEAD
1. From the **Clusters** page, click **Add Cluster**.
2. Choose **Custom**.
3. Enter a **Cluster Name**.
4. Skip **Member Roles** and **Cluster Options**. We'll tell you about them later.
5. Click **Next**.
6. From **Node Role**, select _all_ the roles: **etcd**, **Control**, and **Worker**.
7. Skip the **Labels** stuff. It's not important for now.
8. Copy the command displayed on screen to your clipboard.
9. Log in to your Linux host using your preferred shell, such as PuTTy or a remote Terminal connection. Run the command copied to your clipboard.
10. When you finish running the command on your Linux host, click **Done**.
{{< result_create-cluster >}}
=======
1. Click **+ Add Cluster**.
![add cluster](../../../../img/rancher/click-add-cluster.png)
@@ -309,7 +234,6 @@ In this task, use the versatile **Custom** option. This option lets you convert
- Your cluster is created and assigned a state of **Provisioning**. Rancher is standing up your cluster.
- You can access your cluster after its state is updated to **Active**.
- **Active** clusters are assigned a **Project** and **Namespace**, both of which are named `Default`.
>>>>>>> more menu setup
### Deploy a Workload
@@ -333,19 +257,11 @@ For this workload, you'll be deploying the application NGINX.
7. From **Port Mapping**, click **Add Port**.
<<<<<<< HEAD
8. From the **Publish on** drop-down, make sure that **Every node** is selected.
=======
![enter-docker-image](../../../../img/rancher/enter-docker-image.png)
>>>>>>> more menu setup
8. From the **Source Port** field, leave the **Random** value in place.
<<<<<<< HEAD
7. From the **Container Port** field, enter port `80`.
=======
>**Note:** During Rancher v2.0 beta, only port 80 is supported. Other ports will be supported at GA.
>>>>>>> more menu setup
8. Leave the remaining options on their default setting. We'll tell you about them later.
@@ -366,10 +282,6 @@ From the **Workloads** page, click the link underneath your workload. If your de
Congratulations! You have:
<<<<<<< HEAD
- Created your first cluster.
- Deployed NGINX to your cluster using a workload.
=======
- Created your first cluster.
- Deployed an application to your cluster using a workload.
@@ -483,4 +395,3 @@ You can generate a Kubernetes configuration file to use `kubectl` on your deskto
### Deploying on Ubuntu
It is possible to use Rancher to control Canonical Kubernetes (cdk) clusters running on Ubuntu. A full set of instructions has been provided by Canonical for doing this here: [https://kubernetes.io/docs/getting-started-guides/ubuntu/rancher/](https://kubernetes.io/docs/getting-started-guides/ubuntu/rancher/).-->
>>>>>>> more menu setup
+10 -3
View File
@@ -20,13 +20,16 @@
{{ partial "docs-nav.html" . }}
<div class="row m-t-sm">
{{ if (gt (len .Sections) 0) }}
<aside class="col-sm-3 col-xs-12">
{{ partial "docs-side-nav.html" . }}
{{ partial "docs-side-nav.html" . }}
</aside>
<article class="col-sm-8 col-xs-12 p-l-lg">
{{end}}
<article class="{{ if (gt (len .Sections) 0) }} col-sm-6 {{else}} col-md-9 p-r-lg {{end}} col-xs-12">
<div class="main-content ">
{{ .Content }}
{{ .Content }}
{{ range (.Paginator 5).Pages }}
<div class="box m-b-md">
<div class="p-a-sm">
@@ -78,6 +81,10 @@
{{ template "_internal/pagination.html" . }}
{{ partial "breadcrumbs.html" . }}
</article>
<aside class="col-sm-3 col-xs-12">
<h4>On this page</h4>
{{ .TableOfContents }}
</aside>
</div>
</div>
{{ end }}
+1 -1
View File
@@ -21,7 +21,7 @@
<div class="row m-t-sm">
<aside class="col-sm-3 col-xs-12">
{{ partial "docs-side-nav.html" . }}
{{ partial "docs-side-nav.html" . }}
</aside>
<article class="col-sm-8 col-xs-12 p-h-lg">
<div class="main-content ">