diff --git a/content/rancher/about/_index.md b/content/rancher/about/_index.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/content/rancher/concepts/authentication.md b/content/rancher/concepts/authentication.md new file mode 100644 index 00000000000..9cc8fc71317 --- /dev/null +++ b/content/rancher/concepts/authentication.md @@ -0,0 +1,12 @@ +# Authentication + +One of the key features that {{< product >}} adds to Kubernetes is enhanced user authentication. + +By default, Kubernetes has some authentication shortcomings. Namely, users and groups are tied to the two scopes that Kubernetes uses to group resources: global and namespace. These scopes make it difficult to manage users and groups across different clusters and namespaces. Kubenetes allows integration with other authentication providers that work around these issues using plugins. However, this integration is not available to those leveraging cloud-based Kubenetes offerings such as Google Container Engine (GKE). + +Rancher improves on Kubernetes authentication by integrating external authentication. Out-of-the-box, Rancher provides integration with the following authentication services: + + - Microsoft Active Directory + - GitHub + +## External vs. Local Authentication diff --git a/content/rancher/concepts/users-and-roles.md b/content/rancher/concepts/users-and-roles.md new file mode 100644 index 00000000000..be5042709aa --- /dev/null +++ b/content/rancher/concepts/users-and-roles.md @@ -0,0 +1,43 @@ +# Users and Roles + +Every user in {{< product >}} is assigned a _role_, which is a set of permissions that determine what Kubenetes API endpoints that the user can access. Let's use this metaphor: a user account is like getting access to an entire office building; however, the user's role determine what rooms the user can access within the building. + +Within {{< product >}} there are two types of user roles: + +- [Default roles](#default-roles) +- [Custom roles](#custom-roles) + +In addition, [_Membership_](#membership) plays a part in user access. Membership determines the scope of a user's role. + +## Default Roles + +Out-of-the-box, {{< product >}} comes with two default roles that fulfill most use cases: + +- **Administrators** + + Admins have global access to all Rancher clusters and projects, as well as all permissions. Admins are the "Cow Bosses" of {{< product >}}. + +- **Standard Users** + + If Administrators are the "Cow Bosses" of {{< product >}}, then Standard Users are the "Cowboys." + + Standard users can: + + - Create new clusters + - Manage clusters and projects they hold membership in.
+ + >**Note:** To authorize Standard Users for existing clusters and projects, you must explicitly add the user as a cluster/project member. + + + +## Custom Roles + +If neither of the default roles suit your use case, you can create a _custom role_. While creating a custom role, you can choose the individual roles and permissions for a user within {{< product >}}. Custom roles are helpful when you need to give a user one specific permission without giving them access to the entire system. + +## Membership + +Within {{< product >}}, users and roles are further refined with _membership_. Each cluster and project includes a pool of users who hold membership in that object. Membership allows you to define a scope where a given user's permissions are authorized. + +- All users assigned the Administrator role hold membership in all clusters and projects. + +- Before a user assigned either the standard user or custom role can work in an existing cluster or project, the user must be explicitly added as a member. diff --git a/content/rancher/installation/requirements.md b/content/rancher/installation/requirements.md new file mode 100644 index 00000000000..9afea7f2a45 --- /dev/null +++ b/content/rancher/installation/requirements.md @@ -0,0 +1,50 @@ +# Rancher Requirements + +#### Hardware Requirements + +- Memory: 4GB + +#### Software requirements + +- Operating System: Ubuntu 16.04 (64-bit) +- Software: Docker + + **Supported Versions:** + + - `1.12.6` + - `1.13.1` + - `17.03.2` + + >**Notes:** + > + > * For Docker installation instructions, visit their [documentation](https://docs.docker.com/install/). + > * Docker requirements apply to both your Linux host and your cluster nodes. + +#### Port Requirements + +When provisioning your Linux host, open the ports listed below so that your master and worker nodes can communicate. + +##### Master Nodes (etcd and controlplane nodes) + +Protocol | Direction | Port Range | Purpose +--|---|---|-- +TCP | Inbound | 22 | SSH server +TCP | Inbound | 80 | Canal +TCP | Inbound | 443 | Canal +TCP | Inbound | 6443 | Kubernetes API server +TCP | Inbound | 2379-2380 | etcd server client API +TCP | Inbound | 10250 | kubelet API +TCP | Inbound | 10251 | scheduler +TCP | Inbound | 10252 | controller +TCP | Inbound | 10256 | kubeproxy + +##### Worker Nodes + +Protocol | Direction | Port Range | Purpose +--|---|---|-- +TCP | Inbound | 22 | SSH Server +TCP | Inbound | 80 | Canal +TCP | Inbound | 443 | Canal +TCP | Inbound | 10250 | kubelet API +TCP | Inbound | 10256 | kubeproxy +TCP | Inbound | 30000-32767 | NodePort Services diff --git a/content/rancher/quick-start-guide/_index.md b/content/rancher/quick-start-guide/_index.md index 16783d989c0..1a7ce4da78d 100644 --- a/content/rancher/quick-start-guide/_index.md +++ b/content/rancher/quick-start-guide/_index.md @@ -6,50 +6,55 @@ title: Quick Start Guide weight: 2 --- -Quick Start Guide ---- +# Quick Start Guide -This tutorial walks you through installation of Rancher v2.0, creation of your first cluster, and deployment of an application. +Howdy Partner! This tutorial walks you through: ->**Note:** Upgrades are not supported during the Rancher v2.0 beta. +- Installation of {{< product >}} {{< version >}} +- Creation of your first cluster +- Deployment of an application, NGINX -### Objectives +## Objectives -Creation of your first cluster is a multi-stage process that we've broken into different tasks. +This Quick Start Guide is divided into different tasks for easier consumption. -1. [Review Requirements](#host-and-node-requirements) +1. [Provision a Linux Host](#provision-a-linux-host) - Before you do anything, review the requirements. + Begin by provisioning a Linux host. -2. [Prepare a Linux Host](#prepare-a-linux-host) +2. [Install Rancher](#install-rancher) - First, you need to provision a Linux host. + From your Linux host, run the Docker command for installing Rancher. -3. [Install Rancher](#install-rancher) - - Run the Docker command for installing Rancher. - -4. [Log In](#log-in) +3. [Log In](#log-in) Browse to your Linux host to access the Rancher UI. -5. [Create a Cluster](#create-a-cluster) +4. [Create the Cluster](#create-the-cluster) - Use Rancher to create your first cluster. + Use the versatile **Custom** option to clone your Linux host into a new Kubernetes cluster. -6. [Deploy a Workload](#deploy-a-workload) +5. [Deploy a Workload](#deploy-a-workload) - Create a workload so that Kubernetes can distribute an application and its dependencies among your nodes. + Create a workload so that Kubernetes can distribute NGINX among your cluster nodes. -7. [View Your Application](#view-your-application) +6. [View Your Application](#view-your-application) - When your workload finishes deployment, browse to your application to make sure it works. + When your workload finishes deployment, browse to your node IP to make sure NGINX is running. -8. [What's Next?](#whats-next) +7. [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. + Now that you've created a cluster and deployed NGINX, find out what else you can do with Rancher v2.0. -### Host and Node Requirements +## 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 + +Provision the host according to the requirements below. #### Hardware Requirements @@ -71,45 +76,6 @@ Creation of your first cluster is a multi-stage process that we've broken into d > * For Docker installation instructions, visit their [documentation](https://docs.docker.com/install/). > * Docker requirements apply to both your Linux host and your cluster nodes. -#### Port Requirements - -When provisioning your Linux host, open the ports listed below so that your master and worker nodes can communicate. - -##### Master Nodes (etcd and controlplane nodes) - -Protocol | Direction | Port Range | Purpose ---|---|---|-- -TCP | Inbound | 22 | SSH server -TCP | Inbound | 80 | Canal -TCP | Inbound | 443 | Canal -TCP | Inbound | 6443 | Kubernetes API server -TCP | Inbound | 2379-2380 | etcd server client API -TCP | Inbound | 10250 | kubelet API -TCP | Inbound | 10251 | scheduler -TCP | Inbound | 10252 | controller -TCP | Inbound | 10256 | kubeproxy - -##### Worker Nodes - -Protocol | Direction | Port Range | Purpose ---|---|---|-- -TCP | Inbound | 22 | SSH Server -TCP | Inbound | 80 | Canal -TCP | Inbound | 443 | Canal -TCP | Inbound | 10250 | kubelet API -TCP | Inbound | 10256 | kubeproxy -TCP | Inbound | 30000-32767 | NodePort Services - -### Prepare a Linux Host - -Begin by provisioning a Linux host to be your Rancher server and a template for your cluster nodes. This host can be: - -- A virtual machine hosted by a cloud service. -- An on-premise virtual machine. -- An on-premise bare-metal server. - -Provision the server according to the [requirements above](#host-and-node-requirements). - ### Install Rancher To install Rancher on your host, connect to it and then use a shell to install. @@ -119,16 +85,11 @@ To install Rancher on your host, connect to it and then use a shell to install. 2. From your shell, enter the following command: ``` - $ sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/server:preview + $ sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/server ``` - >**Note:** - > Although Rancher v2.0 is in beta, the `preview` tag is still used for installation. - **Result:** Rancher is installed. - - ### Log In Log in to Rancher to begin using the application. After you log in, you'll make some one-time configurations. @@ -139,131 +100,65 @@ Log in to Rancher to begin using the application. After you log in, you'll make Replace `` with your host IP address. - > **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! - ![login](../../../../img/rancher/change-password.png) +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. +## Create the Cluster -4. Set the **Rancher Server URL**. The URL can either be an IP or a host name. However, each of your cluster nodes must be able to resolve to the URL. +Welcome to {{< product >}}! Use our application to clone your Linux host and configure them as a Kubernetes cluster. - ![login](../../../../img/rancher/server-url.png) +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. -### Create a Cluster +1. From the **Clusters** page, click **Add Cluster**. -Begin using Rancher by creating your first cluster! A *cluster* is a group of physical (or virtual) computers that share resources to accomplish tasks as if they were a single system. +2. Choose **Custom**. -1. Click **+ Add Cluster**. +3. Enter a **Cluster Name**. - ![add cluster](../../../../img/rancher/click-add-cluster.png) +4. Skip **Member Roles** and **Cluster Options**. We'll tell you about them later. - **Step Result:** The **Add Cluster** page opens. +5. Click **Next**. -2. From the **Add Cluster** menu, choose a service or source from which to create your first cluster. +6. From **Node Role**, select _all_ the roles: **etcd**, **Control**, and **Worker**. - * If you're using a virtual machine hosted on a major cloud service, choose the tile for the service you want to use (e.g. **Digital Ocean**, **Azure Container Service**). - * If you're using bare-metal server, an on-premise virtual machine, or a cloud service that isn't explicitly listed, choose **Custom**. +7. Skip the **Labels** stuff. It's not important for now. - > **Note:** - > - > - For Rancher v2.0 beta, Amazon EKS is not supported. This option will be available after GA. - > - For this tutorial, the Import option is out of scope. For now, create a cluster using one of the other options. We'll address Import later. +8. Copy the command displayed on screen to your clipboard. -3. Enter a **Cluster Name**. No spaces allowed. +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. - > **Tip:** Skip adding **Member Roles** for now. This option isn't essential for your first cluster. - > - > ![skip member roles](../../../../img/rancher/skip-member-roles.png) +10. When you finish running the command on your Linux host, click **Done**. -4. **For those using Google Container Engine or Azure Container Service:** - - Complete the form asking for account information. The form includes links to instructions detailing how to obtain this info. - - ![gce-azure-instructions](../../../../img/rancher/gce-azure-instructions.png) - - **Did you choose one of the other tiles (like Digital Ocean)?** This step doesn't apply to you. Skip to the next step. - -5. Select **Cluster Options**. - - Use these options to choose things like the version of Kubernetes that's installed in your cluster, along with other Kubernetes options such as pod security policies. Some services have more options than others. If you're unsure of what to choose, use the default options. - -6. Add at least one **Node Pool**. - - A *Node Pool* is a group of nodes that are configured identically. Your cluster can contain as many node pools as you'd like. Each object in the grid represents a single node configuration. You can use the node pool to choose the number (i.e. **Count**) of nodes running a given configuration (i.e. **Template**). - - > **Note:** The instructions below don't apply to Google Container Engine, Azure Container Service, or the Custom option. - > - >* For Azure Container Server, no additional steps are needed. Proceed to this task's [final step](#create-cluster). - >* For Google Container Engine, complete the Nodes form. The options are pretty self-explanatory. When you're done, proceed to this task's [final step](#create-cluster). - >* For Custom, see [Appendix A: Add Custom Cluster](#appendix-a-add-custom-cluster). - - 1. Enter a **Node Prefix**. When the cluster is created, each node in the pool is named after the prefix. An incremented number is appended to each node. - - 2. Enter the node **Count** for the pool. - - 3. Click **Add Node Template**. A node template is just the a virtual machine configuration you're using to create your nodes (i.e. other virtual machines). - - Depending on the cluster option that you choose, the Rancher UI displays instructions on how to create a template. The process is different for each cloud service. You may need to log in to your cloud service to find the data Rancher needs. - - 4. Choose the **Template** that you just added. - - ![choose template](../../../../img/rancher/choose-template.gif) - - 5. Select roles for the node pool. - - Kubernetes functions using different [components](https://kubernetes.io/docs/concepts/overview/components/), which are divided into *master components* and *node components*. When setting up your node pool, select a pool to fill each component role. You can install all components one a single pool, or you can spread them around. - - The roles are: - - - **etcd**: One of the master components. Etcd is a distributed reliable key-value store that stores all Kubernetes states. - - - **Control**: The remaining master components as well as the node components. These nodes help manage the Kubernetes cluster and where your applications can be launched. - - - **Worker**: On these nodes, only node components are launched. These nodes run only applications. - - 6. **Optional:** Click **+ Add Node Pool** to add more pools. - - ![add-second-node-pool](../../../../img/rancher/add-second-node-pool.gif) - - 7. Click **Create**. - -**Result:** - -- 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`. +{{< result_create-cluster >}} ### Deploy a Workload -You're ready to create your first *workload*. A workload is an object that includes pods along with other files and info needed to deploy your application. +You're ready to create your first _workload_. A workload is an object that includes pods along with other files and info needed to deploy your application. -1. From the **Clusters** page, open the cluster that you just created. +For this workload, you'll be deploying the application NGINX. -2. From the main menu of the **Dashboard**, select **Projects**. +1. From the **Clusters** page, open the cluster that you just created. -3. Open the **Default** project. +2. From the main menu of the **Dashboard**, select **Projects**. -4. Click **+ Deploy**. +3. Open the **Default** project. - ![click-deploy](../../../../img/rancher/click-deploy.png) +4. Click **+ Deploy**. - **Step Result:** The **Deploy Workload** page opens. + **Step Result:** The **Deploy Workload** page opens. -5. Enter a **Name** for your workload. No spaces allowed. +5. Enter a **Name** for your workload. -6. From the **Docker Image** field, enter the name of an image hosted on [Docker Hub](https://hub.docker.com/explore/). +6. From the **Docker Image** field, enter `nginx`. - We're going to use **NGINX** for this guide. You can use something else, but keep it simple. If your app needs other components to run, the deployment won't work. +7. From **Port Mapping**, click **Add Port**. - ![enter-docker-image](../../../../img/rancher/enter-docker-image.png) +8. From the **Publish on** drop-down, make sure that **Every node** is selected. -7. From the **Container Port** field, enter `80`. +8. From the **Source Port** field, leave the **Random** value in place. - >**Note:** During Rancher v2.0 beta, only port 80 is supported. Other ports will be supported at GA. +7. From the **Container Port** field, enter port `80`. 8. Leave the remaining options on their default setting. We'll tell you about them later. @@ -276,127 +171,13 @@ You're ready to create your first *workload*. A workload is an object that inclu ### View Your Application -When your workload completes deployment, browse to your application to confirm that it's working. +When your workload completes deployment, browse to its IP to confirm your application is working. From the **Workloads** page, click the link underneath your workload. If your deployment succeeded, your application opens. -![test-deployment](../../../../img/rancher/test-deployment.png) - - ### What's Next? Congratulations! You have: - Created your first cluster. -- Deployed an application to your cluster using a workload. - -Now you can use the rest of Rancher v2.0 to orchestrate and manage your pods. - -(Moooooo-re coming soon!) - -![cow](../../../../img/rancher/cow.jpg) - - -### Appendix A: Add Custom Cluster - -When creating a custom cluster, follow these instructions to complete its creation. These instructions will create one or more node that will be used to image your cluster. - ->**Note:** When creating a custom cluster, make sure each node meets the [Host Requirements](#host-requirements). - -1. From **Node Roles**, choose the Kubernetes component roles that you want the node to fill. You must fill each role. - - A more detailed description of each [role](#roles) is available earlier in this guide. - - >**Note:** If you want to spread the roles among different nodes, provision additional Linux hosts and enter the command on each of your nodes. - -3. **Optional:** Add labels to the node template. - -4. Copy the command for installing Docker to your clipboard. - - >**Remember:** The version of Docker installed on your nodes must be [supported](#node-requirements). - -5. Log in to your Linux host using your preferred shell, such as PuTTy or a remote Terminal connection. - -6. Enter the command on your Linux host. - -7. From you Rancher session, click **Done**. - -8. Resume the Quick Start Guide from [Deploy a Workload](#deploy-a-workload). - - +- Deployed NGINX to your cluster using a workload. diff --git a/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-amazon-ec2.md b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-amazon-ec2.md new file mode 100644 index 00000000000..57029ea7d80 --- /dev/null +++ b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-amazon-ec2.md @@ -0,0 +1,69 @@ +--- +tag: ["rancher", "cluster"] +category: "rancher" +layout: list-docs +title: Amazon EC2 +weight: 20 +--- + +# Creating an Amazon EC2 Cluster + +## Objectives + +{{< prereq_cluster >}} + +1. [Create an Instance](#create-an-instance) + + Begin by logging into Amazon EC2 website and provisioning a new instance. + +2. [Create the Cluster](#create-the-amazon-ec2-cluster) + + Use your new instance as a template for your new Kubernetes cluster. + +## Create an Instance + +Create an _instance_, Amazon's version of a virtual machine in EC2, using the [Amazon EC2 Management Console](https://aws.amazon.com/ec2/). + +Provision the instance according to our [requirements](../setup/requirements.md). + +[Amazon Instructions](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html) + +## Create the Amazon EC2 Cluster + +Use {{< product >}} to clone your Linux host and configure them as Kubernetes nodes. + +1. From the **Clusters** page, click **Add Cluster**. + +2. Choose **Amazon EC2**. + +3. Enter a **Cluster Name**. + +4. {{< step_create-cluster_member-roles >}} + +5. {{< step_create-cluster_cluster-options >}} + +6. {{< step_create-cluster_node-pools >}} + + 1. Click **Add Node Template**. + + 2. Complete each of the following forms using information available from the [EC2 Management Console](https://aws.amazon.com/ec2). + + - **Account Access** holds the region and API Key used to create the cluster. + + [Amazon Documentation: Creating Access Keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) + + - **Zone and Network** configures the availability zone and network settings for your cluster. + + - **Security Groups** configures the security groups applied to your cluster. + + - **Instance** provisions your VM instances. + + 3. {{< step_rancher-template >}} + + 4. Click **Create**. + + 5. **Optional:** Add additional node pools. +
+6. Review your cluster settings to confirm they're correct. Then click **Create**. + +{{< result_create-cluster >}} diff --git a/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-azure-container-service.md b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-azure-container-service.md new file mode 100644 index 00000000000..71fa20d9ebb --- /dev/null +++ b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-azure-container-service.md @@ -0,0 +1,38 @@ +--- +tag: ["rancher", "cluster"] +category: "rancher" +layout: list-docs +title: Azure Container Service +weight: 30 +--- + +# Creating an Azure Container Service Cluster + +You can use Rancher to create a cluster using Microsoft Azure Container Service. + +1. From the **Clusters** page, click **Add Cluster**. + +2. Choose **Azure Container Service**. + +3. Enter a **Cluster Name**. + +4. {{< step_create-cluster_member-roles >}} + +5. {{< step_create-cluster_cluster-options >}} + +6. Complete the **Account Access** form. This information is used to authenticate with Azure. + + - You can find your **Subscription ID** and **Tenant ID** on the [Microsoft Azure Portal](https://portal.azure.com/). + - To obtain a **Client ID** and **Client Secret**, follow the instructions in [this document](https://www.packer.io/docs/builders/azure-setup.html). +
+7. Use **Nodes** to provision each node in your cluster and choose a geographical region. + + Provision the nodes according to our [requirements](../setup/requirements.md). + + [Microsoft Documentation: How to create and use an SSH public and private key pair](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/mac-create-ssh-keys) +
+8. Click **Create**. +
+9. Review your options to confirm they're correct. Then click **Create**. + +{{< result_create-cluster >}} diff --git a/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-azure.md b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-azure.md new file mode 100644 index 00000000000..bcc7ea7523c --- /dev/null +++ b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-azure.md @@ -0,0 +1,65 @@ +--- +tag: ["rancher", "cluster"] +category: "rancher" +layout: list-docs +title: Azure +weight: 50 +--- + +# Creating an Azure Cluster + +## Objectives + +{{< prereq_cluster >}} + +1. [Create a Linux Virtual Machine](#create-a-linux-virtual-machine) + + Begin by logging into Azure and provisioning a Linux virtual machine (VM). + +2. [Create the Cluster](#create-the-azure-cluster) + + Use your Linux VM as a template for your new Kubernetes cluster. + +## Create a Linux Virtual Machine + +Create a Linux VM using the [Microsoft Azure Portal](https://portal.azure.com) ([Azure Instructions](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/)). + +Provision the droplet according to our [requirements](../setup/requirements.md). + +## Create the Azure Cluster + +Use {{< product >}} to clone your Linux host and configure them as Kubernetes nodes. + +1. From the **Clusters** page, click **Add Cluster**. + +2. Choose **Azure**. + +3. Enter a **Cluster Name**. + +4. {{< step_create-cluster_member-roles >}} + +5. {{< step_create-cluster_cluster-options >}} + +6. {{< step_create-cluster_node-pools >}} + + 1. Click **Add Node Template**. + + 2. Complete the **Azure Options** form. + + - **Placement** sets the geographical region where where your cluster is hosted and other location metadata. + + - **Account Access** stores your account information for authenticating with Azure. + + - **Network** configures the networking used in your cluster. + + - **Instance** customizes your VM configuration. + + 3. {{< step_rancher-template >}} + + 4. Click **Create**. + + 5. **Optional:** Add additional node pools. + +7. Review your options to confirm they're correct. Then click **Create**. + +{{< result_create-cluster >}} diff --git a/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-custom.md b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-custom.md new file mode 100644 index 00000000000..7d0da2efb9d --- /dev/null +++ b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-custom.md @@ -0,0 +1,69 @@ +--- +tag: ["rancher", "cluster"] +category: "rancher" +layout: list-docs +title: Custom Cluster +weight: 10 +--- + +# Creating a Custom Cluster + +## Objectives + +{{< prereq_cluster >}} + +1. [Create a Linux Host](#create-a-linux-host) + + Begin by provisioning a Linux host. + +2. [Create the Cluster](#create-the-custom-cluster) + + Use your new Linux host as a template for your new Kubernetes cluster. + +## 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 + +Provision the host according to our [requirements](../setup/requirements.md). + +>**Bare-Metal Server Note:** +> +While creating your cluster, you must assign Kubernetes roles to your cluster nodes. If you plan on dedicating bare-metal servers to each role, you must provision a bare-metal server for each role (i.e. provision multiple bare-metal servers). + +## Create the Custom Cluster + +Use {{< product >}} to clone your Linux host and configure them as Kubernetes nodes. + +1. From the **Clusters** page, click **Add Cluster**. + +2. Choose **Custom**. + +3. Enter a **Cluster Name**. + +4. {{< step_create-cluster_member-roles >}} + +5. {{< step_create-cluster_cluster-options >}} + +6. Click **Next**. + +7. From **Node Role**, choose the roles that you want filled by a cluster node. + + >**Bare-Metal Server Reminder:** + > + If you plan on dedicating bare-metal servers to each role, you must provision a bare-metal server for each role (i.e. provision multiple bare-metal servers). + +8. **Optional**: Use **Labels** to add metadata so that you can find them later. + +9. Copy the command displayed on screen to your clipboard. + +10. 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. + + >**Note:** Repeat steps 7-10 if you want to dedicate specific hosts to specific node roles. Repeat the steps as many times as needed. + +11. When you finish running the command(s) on your Linux host(s), click **Done**. + +{{< result_create-cluster >}} diff --git a/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-digital-ocean.md b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-digital-ocean.md new file mode 100644 index 00000000000..b5ee567f469 --- /dev/null +++ b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-digital-ocean.md @@ -0,0 +1,65 @@ +--- +tag: ["rancher", "cluster"] +category: "rancher" +layout: list-docs +title: DigitalOcean +weight: 60 +--- + +# Creating a DigitalOcean Cluster + +## Objectives + +{{< prereq_cluster >}} + +1. [Create a Droplet](#create-a-droplet) + + Begin by logging into DigitalOcean and provisioning a new droplet. + +2. [Create the Cluster](#create-the-digital-ocean-cluster) + + Use your new droplet as a template for your new Kubernetes cluster. + +## Create a Droplet + +Create a _droplet_, DigitalOcean's name for a virtual machine, using the DigitalOcean website. + +Provision the droplet according to our [requirements](../setup/requirements.md). + +[DigitalOcean Instructions](https://www.digitalocean.com/community/tutorials/how-to-create-your-first-digitalocean-droplet) + +## Create the DigitalOcean Cluster + +Use {{< product >}} to clone your Linux host and configure them as Kubernetes nodes. + +1. From the **Clusters** page, click **Add Cluster**. + +2. Choose **Digital Ocean**. + +3. Enter a **Cluster Name**. + +4. {{< step_create-cluster_member-roles >}} + +5. {{< step_create-cluster_cluster-options >}} + +6. {{< step_create-cluster_node-pools >}} + + 1. Click **Add Node Template**. + + 2. Paste your DigitalOcean Personal Access Token. + + [DigitalOcean Instructions: How To Generate a Personal Access Token](https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-api-v2#how-to-generate-a-personal-access-token) + + 3. Complete the **DigitalOcean Options** form. + + - **Droplet Options** provision your cluster's geographical region and specifications. + + 4. {{< step_rancher-template >}} + + 5. Click **Create**. + + 6. **Optional:** Add additional node pools. +
+7. Review your options to confirm they're correct. Then click **Create**. + +{{< result_create-cluster >}} diff --git a/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-gke.md b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-gke.md new file mode 100644 index 00000000000..540ec59c92d --- /dev/null +++ b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-gke.md @@ -0,0 +1,59 @@ +--- +tag: ["rancher", "cluster"] +category: "rancher" +layout: list-docs +title: Google Container Engine +weight: 70 +--- + +# Creating a Google Container Engine Cluster + +## Objectives + +{{< prereq_cluster >}} + +1. [Create a Service Account](#create-a-gke-service-account) + + Begin by logging into Google Cloud Platform and creating a service account to operate your cluster. + +2. [Create the Cluster](#create-the-gke-cluster) + + Using your service account, create your Google Container Engine (GKE) cluster. + +## Create a Service Account + +Create a service account using [Google Cloud Platform](https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts). GKE uses this account to operate your cluster. Creating this account also generates a private key used for authentication. + +The service account requires the following roles: + +- `project/viewer` +- `kubernetes-engine/admin` +- `service-account/user` + +[Google Documentation: Creating and Enabling Service Accounts](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances) + +## Create the GKE Cluster + +Use {{< product >}} to set up and configure your Kubernetes cluster. + +1. From the **Clusters** page, click **Add Cluster**. + +2. Choose **Google Container Engine**. + +3. Enter a **Cluster Name**. + +4. {{< step_create-cluster_member-roles >}} + +5. Either paste your service account private key in the **Service Account** text box or **Read from a file**. Then click **Next: Configure Nodes**. + + >**Note:** After submitting your private key, you may have to enable the Google Kubernetes Engine API. If prompted, browse to the URL displayed in the Rancher UI to enable the API. + +6. {{< step_create-cluster_cluster-options >}} + +7. Use **Nodes** to provision each node in your cluster and choose a geographical region. + + Provision the nodes according to our [requirements](../setup/requirements.md). + +8. Review your options to confirm they're correct. Then click **Create**. + +{{< result_create-cluster >}} diff --git a/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-vsphere.md b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-vsphere.md new file mode 100644 index 00000000000..74ca9233c48 --- /dev/null +++ b/content/rancher/tasks/clusters/creating-a-cluster/create-cluster-vsphere.md @@ -0,0 +1,66 @@ +--- +tag: ["rancher", "cluster"] +category: "rancher" +layout: list-docs +title: vSphere +weight: 80 +--- + +# Creating a vSphere Cluster + +## Objectives + +{{< prereq_cluster >}} + +1. [Create a Linux Virtual Machine](#create-a-linux-virtual-machine) + + Begin by logging into vSphere and provisioning a Linux virtual machine (VM). + +2. [Create the Cluster](#create-the-vsphere-cluster) + + Use your new VM as a template for your new Kubernetes cluster. + +## Create a Linux Virtual Machine + +Create a Linux VM using vSphere. + +Provision the droplet according to our [requirements](../setup/requirements.md). + +[VMware Instructions](https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.vm_admin.doc/GUID-39D19B2B-A11C-42AE-AC80-DDA8682AB42C.html) + +## Create the vSphere Cluster + +Use {{< product >}} to clone your Linux host and configure them as Kubernetes nodes. + +1. From the **Clusters** page, click **Add Cluster**. + +2. Choose **vSphere**. + +3. Enter a **Cluster Name**. + +4. {{< step_create-cluster_member-roles >}} + +5. {{< step_create-cluster_cluster-options >}} + +6. {{< step_create-cluster_node-pools >}} + + 1. Click **Add Node Template**. + + 2. Use the **vSphere Options** to authenticate with vSphere and provision your cluster. + + - **Account Access** holds the host name for your vCenter host and your credentials for authentication. + + - **Instance Options** are used to provision your cluster's VMs. + + - **Scheduling** is used to choose the hypervisor your virtual machines will be scheduled to. + + 3. {{< step_rancher-template >}} + + 4. Click **Create**. + + 5. **Optional:** Add additional node pools. + +
+7. Review your options to confirm they're correct. Then click **Create**. + +{{< result_create-cluster >}} diff --git a/content/rancher/tasks/clusters/import-cluster.md b/content/rancher/tasks/clusters/import-cluster.md new file mode 100644 index 00000000000..31e7bfcac49 --- /dev/null +++ b/content/rancher/tasks/clusters/import-cluster.md @@ -0,0 +1,31 @@ +--- +tag: ["rancher", "cluster"] +category: "rancher" +layout: list-docs +title: Importing a Cluster +weight: 90 +--- + +# Importing a Cluster + +You can import an existing Kubernetes cluster and then manage it using Rancher. + +1. From the **Clusters** page, click **Add Cluster**. + +2. Choose **Import**. + +3. Enter a **Cluster Name**. + +4. {{< step_create-cluster_member-roles >}} + +5. Click **Create**. + +6. Copy the first command displayed to your clipboard. + +7. Log into one of your cluster nodes using your preferred shell, such as PuTTy or a remote Terminal connection. Run the command copied to your clipboard. + +8. If you receive a message of `certificate signed by unknown authority`, copy the second command displayed in {{< product >}} to your clipboard. Then run the command on your cluster node. + +9. When you finish running the command(s) on your Linux host(s), click **Done**. + +{{< result_create-cluster >}} diff --git a/content/rancher/tasks/global-configuration/_index.md b/content/rancher/tasks/global-configuration/_index.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/content/rancher/tasks/global-configuration/authentication/configure-user-authentication.md b/content/rancher/tasks/global-configuration/authentication/configure-user-authentication.md new file mode 100644 index 00000000000..2e7fed216da --- /dev/null +++ b/content/rancher/tasks/global-configuration/authentication/configure-user-authentication.md @@ -0,0 +1,87 @@ +# Configuring User Authentication + +You have three options for user authentication in {{< product >}}: + +- **Active Directory**: Enterprises can use Active Directory (AD) for authentication, allowing users to sign in using their corporate credentials. + +- **GitHub**: Open source projects or organizations that use GitHub for source control may prefer that users sign in using their GitHub accounts. + +- **Basic Authentication**: If you don't want to use external authentication, you can always add users directly to {{< product >}}. We recommend using external authentication over basic authentication. + +## Configure an Authentication Method + +### To Configure Active Directory + +>**Prerequisites:** Create a service account in Active Directory with **read-only** access. {{< product >}} uses this account to verify group membership when a user makes a request using an API key. + +1. From the **Global** view, select **Security > Authentication** from the main menu. + +2. Select **Active Directory**. + +3. Complete the **Configure an Active Directory server** form. + + You may need to log in to your domain controller to find the information requested in the form. + + >**Using TLS?** + > + Make sure you have an [LDAP certificate installed](placeholder.md). + + >**User Search Base vs. Group Search Base** + > + >When configuring AD authentication, you must enter a search base for your users. This base allows Rancher to search for users that are in your Active Directory. + - If your users and groups are in the search base, complete only the User Search Base. + - If your groups are in a different search base, you can optionally complete the Group Search Base. This field is dedicated to searching groups, but is not required. + +4. If your Active Directory deviates from the standard AD schema, complete the **Customize Schema** form to match it. Otherwise, skip this step. + +5. Enter your AD username and password in **Test and enable authentication** to confirm that Rancher is configured to use AD authentication. + +### To Configure GitHub + +1. From the **Global** view, select **Security > Authentication** from the main menu. + +2. Select **GitHub**. + +3. Follow the directions displayed to **Setup a GitHub Application**. Rancher redirects you to GitHub to complete registration. + + >**What's an Authorization Callback URL?** + > + >The Authorization Callback URL is the URL where users to begin using your application (i.e. the splash screen). + + >When you use external authentication, sign on authentication does not actually take place in your application. Instead, authentication takes place externally (in this case, GitHub). After this external authorization completes successfully, the Authorization Callback URL is the location that the user reenters your application. + +4. From GitHub, copy the **Client ID** and **Client Secret**. Paste them into {{< product >}}. + + >**Where do I find the Client ID and Client Secret?** + > + >From GitHub, select Settings > Developer Settings > OAuth Apps. The Client ID and Client Secret are displayed prominently. + +5. Click **Authenticate with GitHub**. + +6. Use the **Site Access** options to configure the scope of user authorization. + + - **Allow any valid Users** + + _Any_ GitHub user can access Rancher. We generally discourage use of this setting! + + - **Allow members of Clusters, Projects, plus Authorized Users and Organizations** + + Any GitHub user or group added as a **Cluster Member** or **Project Member** can log in to Rancher. Additionally, any GitHub user or group you add to the **Authorized Users and Organizations** list may log in to Rancher. + + - **Restrict access to only Authorized Users and Organizations** + + Only GitHub users or groups added to the Authorized Users and Organizations can log in to Rancher. +
+7. Click **Save**. + +**Result:** + +- GitHub authentication is configured. +- You are signed into Rancher with your GitHub account. +- Your GitHub account is added to Rancher as an administrator. + +### To Configure Basic Authentication + +1. From the **Global** view, select **Users** from the main menu. + +2. Click **Add User**. Then complete the **Add User** form. Click **Create** when you're done. diff --git a/content/rancher/tasks/global-configuration/pod-security-policies.md b/content/rancher/tasks/global-configuration/pod-security-policies.md new file mode 100644 index 00000000000..d88acf2da74 --- /dev/null +++ b/content/rancher/tasks/global-configuration/pod-security-policies.md @@ -0,0 +1,28 @@ +--- +tag: ["rancher", "pod security policies","security policies", "settings" ] +category: "rancher" +layout: list-docs +title: Adding Pod Security Policies +weight: 90 +--- + +# Adding Pod Security Policies + +Using {{< product >}}, you can create a pod security policy using our GUI rather than creating a .yaml file. + +1. From the **Global** view, select **Security** > **Pod Security Policies** from the main menu. Then click **Add Policy**. + + **Step Result:** The **Add Policy** form opens. + +2. Name the policy. +3. Complete each section of the form. Refer to the Kubernetes documentation linked below for more information on what each policy does. + + - Basic Policies + - Capability Policies + - Volume Policy + - Allowed Host Paths Policy + - FS Group Policy + - Host Ports Policy + - Run As User Policy + - SELinux Policy + - Supplemental Groups Policy diff --git a/content/rancher/tasks/global-configuration/roles.md b/content/rancher/tasks/global-configuration/roles.md new file mode 100644 index 00000000000..52b0abc0e42 --- /dev/null +++ b/content/rancher/tasks/global-configuration/roles.md @@ -0,0 +1,35 @@ +# Roles + +While _users_ determine who can log into Rancher, _roles_ determine which Kubernetes API endpoints and Rancher roles that a user can access after login. In other words, roles determine the user's _permissions_ when using Rancher. + +## Adding A Custom Role + +While Rancher comes out-of-the-box with a set of default user roles, you can also create custom roles to provide users with very specific permissions within Rancher. + +1. From the **Global** view, select **Security** > **Roles** from the main menu. + +2. Click **Add Role**. + +3. **Name** the role. + +4. Assign the role a **Context**. Context determines the scope of permissions assigned to the user. The contexts are: + + - **All** + + The user can use their assigned permissions regardless of context. The user's permissions are valid in all clusters and projects. + + - **Cluster** + + The user can use their assigned permissions within a selected cluster. + + - **Project** + + The user can use their assigned permissions within a selected project. + +5. Use the **Grant Resources** options to assign individual [Kubernetes API endpoints](https://kubernetes.io/docs/reference/) to the role. + + You can also choose the individual cURL methods (`Create`, `Delete`, `Get`, etc.) available for use with each endpoint you assign. + +6. Use the **Inherit from a Role** options to assign individual Rancher roles to your custom roles. + +7. Click **Create**. diff --git a/content/rancher/tasks/global-configuration/server-url.md b/content/rancher/tasks/global-configuration/server-url.md new file mode 100644 index 00000000000..bbf5789afbb --- /dev/null +++ b/content/rancher/tasks/global-configuration/server-url.md @@ -0,0 +1,17 @@ +--- +tag: ["rancher", "server url", "settings" ] +category: "rancher" +layout: list-docs +title: Updating the Server URL +weight: 90 +--- + +# Updating the {{< product >}} Server URL + +The first time that you log into {{< product >}}, the system prompts for the {{< product >}} Server URL, which is the IP address or host name that your Kubernetes nodes register with. + +If you need to update this URL, select **Settings** from the **Global** view. + +### When Should I Update the {{< product >}} Server URL? + +If URL of your {{< product >}} Server changes, you must update the {{< product >}} Server URL so that your nodes can continue communication with the {{< product >}} Server. diff --git a/content/rancher/tasks/miscellaneous/_index.md b/content/rancher/tasks/miscellaneous/_index.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/content/rancher/tasks/pipelines/_index.md b/content/rancher/tasks/pipelines/_index.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/content/rancher/tasks/projects/_index.md b/content/rancher/tasks/projects/_index.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/content/rancher/tasks/users/_index.md b/content/rancher/tasks/users/_index.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/content/rancher/tasks/workloads/_index.md b/content/rancher/tasks/workloads/_index.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/layouts/shortcodes/prereq_cluster.html b/layouts/shortcodes/prereq_cluster.html new file mode 100644 index 00000000000..a9fa9fbe8a0 --- /dev/null +++ b/layouts/shortcodes/prereq_cluster.html @@ -0,0 +1,5 @@ +
+

+ Prerequisites: Review the [requirements](placeholder.md) for your Linux host. +

+
diff --git a/layouts/shortcodes/product.html b/layouts/shortcodes/product.html new file mode 100644 index 00000000000..e56e7808e0c --- /dev/null +++ b/layouts/shortcodes/product.html @@ -0,0 +1 @@ +Rancher diff --git a/layouts/shortcodes/result_create-cluster.html b/layouts/shortcodes/result_create-cluster.html new file mode 100644 index 00000000000..8aaada7a97c --- /dev/null +++ b/layouts/shortcodes/result_create-cluster.html @@ -0,0 +1,8 @@ +
+

Result:

+ +
diff --git a/layouts/shortcodes/step_create-cluster_cluster-options.html b/layouts/shortcodes/step_create-cluster_cluster-options.html new file mode 100644 index 00000000000..28064c50abd --- /dev/null +++ b/layouts/shortcodes/step_create-cluster_cluster-options.html @@ -0,0 +1 @@ +

Use Cluster Options to choose the version of Kubernetes installed on each cluster node, along with some other options for you cluster.

diff --git a/layouts/shortcodes/step_create-cluster_member-roles.html b/layouts/shortcodes/step_create-cluster_member-roles.html new file mode 100644 index 00000000000..6c4e3e3e45c --- /dev/null +++ b/layouts/shortcodes/step_create-cluster_member-roles.html @@ -0,0 +1,8 @@ +
+

Use Member Roles to configure user authorization for the cluster.

+ +
+
diff --git a/layouts/shortcodes/step_create-cluster_node-pools.html b/layouts/shortcodes/step_create-cluster_node-pools.html new file mode 100644 index 00000000000..7b3154d378f --- /dev/null +++ b/layouts/shortcodes/step_create-cluster_node-pools.html @@ -0,0 +1,10 @@ +

Add one or more Node Pools to your cluster. A node pool is a set of virtual machines configured identically to your Linux host. However, each node in the pool also has additional Kubernetes master and worker components installed.

+ +

+

Notes:

+ +
diff --git a/layouts/shortcodes/step_rancher-template.html b/layouts/shortcodes/step_rancher-template.html new file mode 100644 index 00000000000..d17c5be1616 --- /dev/null +++ b/layouts/shortcodes/step_rancher-template.html @@ -0,0 +1,14 @@ +

Complete the Rancher Template form to add metadata so that you can find your template in Rancher later.

+ diff --git a/layouts/shortcodes/version.html b/layouts/shortcodes/version.html new file mode 100644 index 00000000000..4149d033b05 --- /dev/null +++ b/layouts/shortcodes/version.html @@ -0,0 +1 @@ +v2.0