github.com/apprenda/kismatic@v1.12.0/docs/packages.md (about) 1 # Software Packages 2 3 Starting with KET v1.6, the tool installs the "official" packages from Kubernetes and Docker. For any cluster built with a previous version of KET, the packages will be upgraded to use the new repos during the regular upgrade process and should have no impact on the users. 4 5 6 By default, Kismatic will install the required repos onto machines and use them to install the packages. This may not be acceptable, for example, if you want to adopt a "golden image" prior to rolling out a many-node cluster, if you need to install a cluster in a lab where most machines are disconnected from the internet, or if you simply want to save bandwidth. If this is your use case, please view the [instructions below](#synclocal). 7 8 ## Installing via RPM (Redhat, CentOS) 9 10 #### Add the Docker repo to the machine 11 ``` 12 sudo bash -c 'cat <<EOF > /etc/yum.repos.d/docker.repo 13 [docker] 14 name=Docker 15 baseurl=https://download.docker.com/linux/centos/7/x86_64/stable/ 16 enabled=1 17 gpgcheck=1 18 repo_gpgcheck=1 19 gpgkey=https://download.docker.com/linux/centos/gpg 20 EOF' 21 ``` 22 23 #### Add the Kubernetes repo to the machine 24 ``` 25 sudo bash -c 'cat <<EOF > /etc/yum.repos.d/kubernetes.repo 26 [kubernetes] 27 name=Kubernetes 28 baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 29 enabled=1 30 gpgcheck=1 31 repo_gpgcheck=1 32 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg 33 https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg 34 EOF' 35 ``` 36 37 #### Install the RPMs for the type of node you want to create 38 39 | Component | Install Command | 40 | ---- | ---- | 41 | Etcd Node | `sudo yum -y install --setopt=obsoletes=0 docker-ce-17.03.2.ce-1.el7.centos` | 42 | Kubernetes Node | `sudo yum -y install --setopt=obsoletes=0 docker-ce-17.03.2.ce-1.el7.centos && yum -y install nfs-utils kubelet-1.10.5-0 kubectl-1.10.5-0` | 43 44 ## Installing via DEB (Ubuntu Xenial) 45 46 #### Add the Docker repo to the machine 47 48 1. Install prerequisites 49 ``` 50 sudo apt-get update && sudo apt-get install -y apt-transport-https curl 51 ``` 52 53 2. Add the Docker public key to apt 54 55 ``` 56 curl -s https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 57 ``` 58 59 3. Add the Docker repo 60 61 ``` 62 sudo bash -c 'cat <<EOF >/etc/apt/sources.list.d/docker.list 63 deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable 64 EOF' 65 ``` 66 67 #### Add the Kubernetes repo to the machine 68 1. Add the Kubernetes public key to apt 69 70 ``` 71 curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - 72 ``` 73 74 2. Add the Kubernetes repo 75 76 ``` 77 sudo bash -c 'cat <<EOF >/etc/apt/sources.list.d/kubernetes.list 78 deb https://packages.cloud.google.com/apt/ kubernetes-xenial main 79 EOF' 80 ``` 81 82 #### Refresh the machine's repo cache 83 84 ``` 85 sudo apt-get update 86 ``` 87 88 #### Install the RPMs for the type of node you want to create 89 90 | Component | Install Command | 91 | ---- | ---- | 92 | Etcd Node | `sudo apt-get install -y docker-ce=17.03.2~ce-0~ubuntu-xenial` | 93 | Kubernetes Node | `sudo apt-get install -y docker-ce=17.03.2~ce-0~ubuntu-xenial nfs-common kubelet=1.10.5-00 kubectl=1.10.5-00` | 94 95 #### Stop the kubelet 96 When the Ubuntu kubelet package is installed the service will be started and will bind to ports. This will cause some preflight port checks to fail. 97 ``` 98 sudo systemctl stop kubelet 99 ``` 100 101 # <a name="synclocal"></a>Synchronizing a local repo 102 103 If you maintain a package repository, you should not perform step 1 in the instructions above. Instead, you should point machines to your own package repository and keep it in sync with Docker and Kubernetes. 104 105 Each package will also have many transitive dependencies. To be able to install nodes fully disconnected from the internet, you will need to synchronize your repo with these packages' repos as well. 106 107 Dependencies and their versions will change over time and as such they are not listed here. Instead, they can be derived from any machine that is integrated with our repos using the commands linked below. 108 109 One way to ensure you've correctly synchronized your repo is to install a test cluster. 110 111 1. Provision 1 node of each role 112 2. Install the packages 113 3. Run `kismatic plan` to generate a new Plan file 114 4. Update the Plan file to identify your nodes and using the configuration `disable_package_installation=true`. 115 5. Run `kismatic validate` 116 6. During validation, the Kismatic inspector will check your packages to be sure they installed correctly and will fail if any of them are missing. 117 118 Changes to dependencies should be called out in the notes that accompany a release. 119 120 ## yum 121 122 Listing dependencies of a package: `yum deplist $PACKAGE` 123 124 [Syncing with a repo](http://bencane.com/2013/04/15/creating-a-local-yum-repository/) 125 126 ## apt 127 128 129 Listing dependencies of a package: `apt-cache depends $PACKAGE` 130 131 [Syncing with a repo](http://www.tecmint.com/setup-local-repositories-in-ubuntu/)