Forked from zenxedo/Proxmox-RancherOS-Portainer Ultimate Setup.md
Created
April 14, 2020 13:11
-
-
Save calintech/8a96e8ffc31cd4e640c741d8275b9c20 to your computer and use it in GitHub Desktop.
Revisions
-
zenxedo revised this gist
Dec 5, 2019 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,11 @@ #### WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK I have tried this setup and although it works and may be good for ceratin circumstances I would advise using ubuntu as the base with docker, docker-compose, and portainer. https://gist.github.com/mow4cash/626275e095f7f90898944a85d66b3be6 Link to my docker run file https://gist.github.com/mow4cash/6a25343cdeb0cd115f263dea0a3b623d -
zenxedo revised this gist
Nov 7, 2019 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ #### WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK Link to my docker run file https://gist.github.com/mow4cash/6a25343cdeb0cd115f263dea0a3b623d ## Setup Proxmox -
zenxedo revised this gist
Nov 7, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -88,8 +88,9 @@ https://www.portainer.io/2018/09/using-macvlan-portainer-io/ 5. when creating a container select the network you just added and give it an availble static IP ## Rancher OS commands and resources ``` sudo vi /var/lib/rancher/conf/cloud-config.yml ##edit config file ``` https://medium.com/the-code-review/clean-out-your-docker-images-containers-and-volumes-with-single-commands-b8e38253c271 https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes -
zenxedo revised this gist
Nov 7, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,8 @@ ## Install Proxmox and a RancherOS VM with Portainer to manage docker containers #### WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK ## Setup Proxmox 1. Install Proxmox 6.X iso -
zenxedo renamed this gist
Nov 7, 2019 . 1 changed file with 29 additions and 31 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## Install Proxmox and a RancherOS VM with Portainer #### WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK @@ -57,33 +57,14 @@ ssh_authorized_keys: 9. sudo ros config validate -i cloud-config.yml 10. sudo ros install -c cloud-config.yml -d /dev/sda 11. Remove CD Image from VM, and then reboot. 12. SSH back into RancherOS (rancher@<IP>) using your new ssh private key ## Create NFS Shares on FreeNAS 1. create a unix dataset called appsNFS with root and wheel as the user, set a quota for 50gb 2. create a nfs share to the dataset you created, select all dirs, mapall user:group to root:wheel 3. enable nfs sharing and select nfsv4, allow non-root, nfsv3 ownership for nfsv4 4. reboot freenas ## Add NFS mnt to RancherOS ``` @@ -99,12 +80,11 @@ sudo docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --r ## Add macvlan so containers are given an IP and mac from your LAN https://www.portainer.io/2018/09/using-macvlan-portainer-io/ 1. click add network 2. select macvlan 3. enter in your lan network 4. select enable manual connection 5. when creating a container select the network you just added and give it an availble static IP ## Rancher OS commands and resources @@ -124,4 +104,22 @@ docker rm portainer docker pull portainer/portainer:latest docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer -v /mnt/appsNFS/portainer:/data portainer/portainer ``` ## Install Rancher (optional) - sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher - log in to ranhcer thorugh the web browser - Add Cluster. - Choose Custom. - Enter a Cluster Name. Click Next. - From Node Role, select all the roles: etcd, Control, and Worker. - Copy the command displayed on screen to your clipboard. - Log in to your Rancher host with PuTTy. Run the command copied to your clipboard. - When you finish running the command on your Linux host, click Done. - Wait for your cluster to finish provisioning - Reboot to make sure everything is working right Creating your first container - In your cluster drop down tab select default then deploy - give it a name and add the ports and env needed -
zenxedo revised this gist
Nov 7, 2019 . 1 changed file with 6 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -86,16 +86,15 @@ Creating your first container - reboot freenas ## Add NFS mnt to RancherOS ``` sudo ros config set mounts '[["10.68.69.2:/mnt/myVol/appsNFS", "/mnt/appsNFS", "nfs4",""]]' ``` ## Install Portainer with NFS share ``` sudo docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer -v /mnt/appsNFS/portainer:/data portainer/portainer ``` 1. Navigate to http://hostIP:9000 and select local 2. When adding volumes to a container select bind and use the path /mnt/appsNFS/whateveryouwanthere ## Add macvlan so containers are given an IP and mac from your LAN https://www.portainer.io/2018/09/using-macvlan-portainer-io/ -
zenxedo revised this gist
Nov 7, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -119,9 +119,10 @@ Your PVE GUI and slect the upgrade button ## Rancher OS sudo ros os upgrade ## Update Portainer ``` docker stop portainer docker rm portainer docker pull portainer/portainer:latest docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer -v /mnt/appsNFS/portainer:/data portainer/portainer ``` -
zenxedo revised this gist
Nov 7, 2019 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -113,12 +113,12 @@ sudo vi /var/lib/rancher/conf/cloud-config.yml ##edit config file https://medium.com/the-code-review/clean-out-your-docker-images-containers-and-volumes-with-single-commands-b8e38253c271 https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes # Updates ## Proxmox Your PVE GUI and slect the upgrade button ## Rancher OS sudo ros os upgrade ## Update Portainer docker stop portainer docker rm portainer docker pull portainer/portainer:latest -
zenxedo revised this gist
Nov 7, 2019 . 1 changed file with 8 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -91,7 +91,7 @@ sudo ros config set mounts '[["10.68.69.2:/mnt/myVol/appsNFS", "/mnt/appsNFS", " ## Install Portainer with NFS share sudo docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer -v /mnt/appsNFS/portainer:/data portainer/portainer select local @@ -113,16 +113,15 @@ sudo vi /var/lib/rancher/conf/cloud-config.yml ##edit config file https://medium.com/the-code-review/clean-out-your-docker-images-containers-and-volumes-with-single-commands-b8e38253c271 https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes ## Updates # Proxmox Your PVE GUI and slect the upgrade button # Rancher OS sudo ros os upgrade # Update Portainer docker stop portainer docker rm portainer docker pull portainer/portainer:latest docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer -v /mnt/appsNFS/portainer:/data portainer/portainer -
zenxedo revised this gist
Nov 7, 2019 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -91,7 +91,7 @@ sudo ros config set mounts '[["10.68.69.2:/mnt/myVol/appsNFS", "/mnt/appsNFS", " ## Install Portainer with NFS share sudo docker run -d -p 9001:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer -v /mnt/appsNFS/portainer:/data portainer/portainer select local @@ -122,8 +122,7 @@ sudo ros os upgrade ##update rancherOS docker stop portainer docker rm portainer docker pull portainer/portainer:latest docker run -d -p 9001:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer -v /mnt/appsNFS/portainer:/data portainer/portainer -
zenxedo revised this gist
Nov 7, 2019 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -81,7 +81,7 @@ Creating your first container ## Create NFS Shares on FreeNAS - create a unix dataset called appsNFS with root and wheel as the user, set a quota for 50gb - create a nfs share to the dataset you created, select all dirs, mapall user:group to root:wheel - enable nfs sharing and select nfsv4, allow non-root, nfsv3 ownership for nfsv4 - reboot freenas @@ -110,10 +110,14 @@ when creating a container select the network you just added and give it an avail ## Rancher OS commands and resources sudo vi /var/lib/rancher/conf/cloud-config.yml ##edit config file https://medium.com/the-code-review/clean-out-your-docker-images-containers-and-volumes-with-single-commands-b8e38253c271 https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes ## Update Rancher OS sudo ros os upgrade ##update rancherOS ## Update Portainer docker stop portainer -
zenxedo revised this gist
Nov 7, 2019 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -113,3 +113,13 @@ sudo vi /var/lib/rancher/conf/cloud-config.yml ##edit config file sudo ros os upgrade ##update rancherOS https://medium.com/the-code-review/clean-out-your-docker-images-containers-and-volumes-with-single-commands-b8e38253c271 https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes ## Update Portainer docker stop portainer docker rm portainer docker rmi portainer/portainer docker pull portainer/portainer:latest docker run -d -p 9001:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer2 -v /mnt/appsNFS/portainer:/data portainer/portainer -
zenxedo revised this gist
Nov 3, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -87,11 +87,11 @@ Creating your first container ## Add NFS mnt to RancherOS sudo ros config set mounts '[["10.68.69.2:/mnt/myVol/appsNFS", "/mnt/appsNFS", "nfs4",""]]' ## Install Portainer with NFS share sudo docker run -d -p 9001:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer2 -v /mnt/appsNFS/portainer:/data portainer/portainer select local -
zenxedo revised this gist
Nov 2, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ## Install Proxmox, RancherOS, in a VM with Rancher 2.0 and Portainer #### WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK ## Setup Proxmox -
zenxedo revised this gist
Nov 2, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #### WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK ### Install Proxmox, RancherOS, in a VM with Rancher 2.0 and Portainer -
zenxedo revised this gist
Nov 2, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK ### Install Proxmox, RancherOS, in a VM with Rancher 2.0 and Portainer -
zenxedo revised this gist
Nov 1, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ deb http://security.debian.org buster/updates main contrib 5. SSH to rancher@<host> 6. prepare your ssh keys with putty gen -vi cloud-config.yml 7. paste the cloud config edited with your settings, make sure the pasted data is pated correctly, add your key in a single line and make sure the file has #cloud-config in the beginning 8. press exit exit :wq to save ``` #cloud-config -
zenxedo revised this gist
Nov 1, 2019 . 1 changed file with 7 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,8 +59,9 @@ ssh_authorized_keys: 11. Remove CD Image from VM, and then reboot. 12. SSH back into RancherOS (rancher@<IP>) using your new ssh private key ## Install Rancher (optional) - sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher - log in to ranhcer thorugh the web browser - Add Cluster. @@ -79,10 +80,10 @@ Creating your first container ## Create NFS Shares on FreeNAS - create a unix dataset called appsNFS with root and wheel as the user, set a quota for 50gb - create a nfs share to the dtatset you created, select all dirs, mapall user:group to root:wheel - enable nfs sharing and select nfsv4, allow non-root, nfsv3 ownership for nfsv4 - reboot freenas ## Add NFS mnt to RancherOS -
zenxedo revised this gist
Nov 1, 2019 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -62,16 +62,16 @@ ssh_authorized_keys: ## Install Rancher (optional) -sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher - log in to ranhcer thorugh the web browser - Add Cluster. - Choose Custom. - Enter a Cluster Name. Click Next. - From Node Role, select all the roles: etcd, Control, and Worker. - Copy the command displayed on screen to your clipboard. - Log in to your Rancher host with PuTTy. Run the command copied to your clipboard. - When you finish running the command on your Linux host, click Done. - Wait for your cluster to finish provisioning - Reboot to make sure everything is working right Creating your first container - In your cluster drop down tab select default then deploy -
zenxedo revised this gist
Nov 1, 2019 . 1 changed file with 15 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,11 +28,11 @@ deb http://security.debian.org buster/updates main contrib 2. Setup a VM with RancherOS ISO as CD. Give it at least 3gb ram to start. Rancher Server failed with low ram 3. Boot 4. From Console change password -sudo bash -passwd rancher 5. SSH to rancher@<host> 6. prepare your ssh keys with putty gen -vi cloud-config.yml 7. paste the cloud config edited with your settings, make sure the pasted data is pated correctly, add your key in a single line 8. press exit exit :wq to save ``` @@ -60,18 +60,18 @@ ssh_authorized_keys: 12. SSH back into RancherOS (rancher@<IP>) using your new ssh private key ## Install Rancher (optional) -sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher -log in to ranhcer thorugh the web browser - Add Cluster. -Choose Custom. -Enter a Cluster Name. Click Next. -From Node Role, select all the roles: etcd, Control, and Worker. -Copy the command displayed on screen to your clipboard. -Log in to your Rancher host with PuTTy. Run the command copied to your clipboard. -When you finish running the command on your Linux host, click Done. -Wait for your cluster to finish provisioning -Reboot to make sure everything is working right Creating your first container - In your cluster drop down tab select default then deploy -
zenxedo revised this gist
Nov 1, 2019 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,17 +24,17 @@ deb http://security.debian.org buster/updates main contrib ## Install RancherOS 1. Upload the RancherOS iso to (local)pve 2. Setup a VM with RancherOS ISO as CD. Give it at least 3gb ram to start. Rancher Server failed with low ram 3. Boot 4. From Console change password - sudo bash - passwd rancher 5. SSH to rancher@<host> 6. prepare your ssh keys with putty gen - vi cloud-config.yml 7. paste the cloud config edited with your settings, make sure the pasted data is pated correctly, add your key in a single line 8. press exit exit :wq to save ``` #cloud-config @@ -54,10 +54,10 @@ rancher: rancheros ssh_authorized_keys: - ssh-rsa <YOUR KEY> ``` 9. sudo ros config validate -i cloud-config.yml 10. sudo ros install -c cloud-config.yml -d /dev/sda 11. Remove CD Image from VM, and then reboot. 12. SSH back into RancherOS (rancher@<IP>) using your new ssh private key ## Install Rancher (optional) - sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher -
zenxedo revised this gist
Nov 1, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ deb http://security.debian.org buster/updates main contrib - passwd rancher 5.SSH to rancher@<host> 6.prepare your ssh keys with putty gen - vi cloud-config.yml 7.paste the cloud config edited with your settings, make sure the pasted data is pated correctly, add your key in a single line 8.press exit exit :wq to save ``` -
zenxedo revised this gist
Nov 1, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,8 +28,8 @@ deb http://security.debian.org buster/updates main contrib 2.Setup a VM with RancherOS ISO as CD. Give it at least 3gb ram to start. Rancher Server failed with low ram 3.Boot 4.From Console change password - sudo bash - passwd rancher 5.SSH to rancher@<host> 6.prepare your ssh keys with putty gen - vi cloud-config.yml -
zenxedo revised this gist
Nov 1, 2019 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,17 +24,17 @@ deb http://security.debian.org buster/updates main contrib ## Install RancherOS 1.Upload the RancherOS iso to (local)pve 2.Setup a VM with RancherOS ISO as CD. Give it at least 3gb ram to start. Rancher Server failed with low ram 3.Boot 4.From Console change password - sudo bash - passwd rancher 5.SSH to rancher@<host> 6.prepare your ssh keys with putty gen - vi cloud-config.yml 7.paste the cloud config edited with your settings, make sure the pasted data is pated correctly, add your key in a single line 8.press exit exit :wq to save ``` #cloud-config @@ -54,10 +54,10 @@ rancher: rancheros ssh_authorized_keys: - ssh-rsa <YOUR KEY> ``` 9.sudo ros config validate -i cloud-config.yml 10.sudo ros install -c cloud-config.yml -d /dev/sda 11.Remove CD Image from VM, and then reboot. 12.SSH back into RancherOS (rancher@<IP>) using your new ssh private key ## Install Rancher (optional) - sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher -
zenxedo revised this gist
Nov 1, 2019 . 1 changed file with 26 additions and 27 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,37 +4,37 @@ ## Setup Proxmox 1. Install Proxmox 6.X iso 2. Console/SSH into Proxmox 3. nano /etc/apt/sources.list 4. edit the file to look like this ``` deb http://ftp.debian.org/debian buster main contrib deb http://ftp.debian.org/debian buster-updates main contrib # PVE pve-no-subscription repository provided by proxmox.com, # NOT recommended for production use deb http://download.proxmox.com/debian/pve buster pve-no-subscription # security updates deb http://security.debian.org buster/updates main contrib ``` 5. apt update && apt dist-upgrade -y 6. reboot system ## Install RancherOS Upload the RancherOS iso to (local)pve Setup a VM with RancherOS ISO as CD. Give it at least 3gb ram to start. Rancher Server failed with low ram Boot From Console change password - sudo bash - passwd rancher SSH to rancher@<host> prepare your ssh keys with putty gen - vi cloud-config.yml paste the cloud config edited with your settings, make sure the pasted data is pated correctly, add your key in a single line press exit exit :wq to save ``` #cloud-config @@ -54,12 +54,12 @@ rancher: rancheros ssh_authorized_keys: - ssh-rsa <YOUR KEY> ``` sudo ros config validate -i cloud-config.yml sudo ros install -c cloud-config.yml -d /dev/sda Remove CD Image from VM, and then reboot. SSH back into RancherOS (rancher@<IP>) using your new ssh private key ## Install Rancher (optional) - sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher log in to ranhcer thorugh the web browser @@ -73,19 +73,18 @@ When you finish running the command on your Linux host, click Done. Wait for your cluster to finish provisioning Reboot to make sure everything is working right Creating your first container - In your cluster drop down tab select default then deploy - give it a name and add the ports and env needed ## Create NFS Shares on FreeNAS create a unix dataset called appsNFS with root and wheel as the user, set a quota for 50gb create a nfs share to the dtatset you created, select all dirs, mapall user:group to root:wheel enable nfs sharing and select nfsv4, allow non-root, nfsv3 ownership for nfsv4 reboot freenas ## Add NFS mnt to RancherOS sudo ros config set mounts '[["10.68.69.2:/mnt/MyVol/appsNFS", "/home/rancher/appsNFS", "nfs4",""]]' -
zenxedo revised this gist
Nov 1, 2019 . 1 changed file with 14 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -78,36 +78,38 @@ Reboot to make sure everything is working right 1. In your cluster drop down tab select default then deploy 2. give it a name and add the ports and env needed ## NFS Shares on FreeNAS create a unix dataset called appsNFS with root and wheel as the user, set a quota for 50gb create a nfs share to the dtatset you created, select all dirs, mapall user:group to root:wheel enable nfs sharing and select nfsv4, allow non-root, nfsv3 ownership for nfsv4 reboot freenas ## Add NFS mnt to rancherOS sudo ros config set mounts '[["10.68.69.2:/mnt/MyVol/appsNFS", "/home/rancher/appsNFS", "nfs4",""]]' ## Install Portainer with NFS share sudo docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer -v /mnt/appsNFS/portainer:/data portainer/portainer select local when adding volumes select bind and use the path /mnt/appsNFS/whateveryouwanthere ## Add macvlan so containers are given an IP and mac from your LAN https://www.portainer.io/2018/09/using-macvlan-portainer-io/ click add network select macvlan enter in your lan network select enable manual connection when creating a container select the network you just added and give it an availble static IP ## Rancher OS commands and resources sudo vi /var/lib/rancher/conf/cloud-config.yml ##edit config file sudo ros os upgrade ##update rancherOS https://medium.com/the-code-review/clean-out-your-docker-images-containers-and-volumes-with-single-commands-b8e38253c271 https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes -
zenxedo revised this gist
Dec 27, 2018 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -98,6 +98,14 @@ reboot freenas sudo ros config set mounts '[["10.68.69.2:/mnt/MyVol/appsNFS", "/home/rancher/appsNFS", "nfs4",""]]' ## Add macvlan so containers are given an IP and mac from your LAN click add network select macvlan enter in your lan network select enable manual connection when creating a container select the network you just added and give it an availble static IP ## Help sudo vi /var/lib/rancher/conf/cloud-config.yml -
zenxedo revised this gist
Dec 25, 2018 . 1 changed file with 9 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ ## WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK ### Install Proxmox, RancherOS, in a VM with Rancher 2.0 and Portainer ## Setup Proxmox @@ -76,16 +78,14 @@ Reboot to make sure everything is working right 1. In your cluster drop down tab select default then deploy 2. give it a name and add the ports and env needed ## Install Portainer with NFS share sudo docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always --name portainer -v /mnt/appsNFS/portainer:/data portainer/portainer select local when adding volumes select bind and use the path /mnt/appsNFS/whateveryouwanthere ## NFS Shares on FreeNAS @@ -94,8 +94,12 @@ create a nfs share to the dtatset you created, select all dirs, mapall user:grou enable nfs sharing and select nfsv4, allow non-root, nfsv3 owner ship reboot freenas ## Add NFS mnt to rancherOS sudo ros config set mounts '[["10.68.69.2:/mnt/MyVol/appsNFS", "/home/rancher/appsNFS", "nfs4",""]]' ## Help sudo vi /var/lib/rancher/conf/cloud-config.yml https://medium.com/the-code-review/clean-out-your-docker-images-containers-and-volumes-with-single-commands-b8e38253c271 -
zenxedo revised this gist
Dec 24, 2018 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -82,7 +82,17 @@ Reboot to make sure everything is working right select local add volumes using nfs and the full path example /mnt/myVol/appsNFS/ombi create an ombi directory inside appsNFS you can do the same thing for any other apps ## NFS Shares on FreeNAS create a unix dataset called appsNFS with root and wheel as the user, set a quota for 50gb create a nfs share to the dtatset you created, select all dirs, mapall user:group to root:wheel enable nfs sharing and select nfsv4, allow non-root, nfsv3 owner ship reboot freenas -
zenxedo revised this gist
Dec 24, 2018 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -76,12 +76,16 @@ Reboot to make sure everything is working right 1. In your cluster drop down tab select default then deploy 2. give it a name and add the ports and env needed ## Install Portainer Option - sudo docker run -d --name portainer --privileged -v /var/run/docker.sock:/var/run/docker.sock --restart=unless-stopped -p 9000:9000 portainer/portainer select local add volumes using nfs ## Help https://medium.com/the-code-review/clean-out-your-docker-images-containers-and-volumes-with-single-commands-b8e38253c271
NewerOlder