This file contains 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 characters
--- | |
container_name: portainer | |
container_image: portainer/portainer-ce | |
container_ports: 9000:9000 | |
container_config_volume: /var/run/docker.sock:/var/run/docker.sock | |
container_data_volume: /home/vagrant/portainer:/data |
This file contains 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 characters
- name: Installing Portainer With Ansible | |
hosts: cluster | |
become: True | |
vars_files: | |
- vars/default.yml | |
tasks: | |
- name: Installing Docker Module for Python | |
pip: | |
name: docker | |
- name: Pulling portainer docker image |
This file contains 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 characters
- name: Install Docker with Ansible | |
hosts: cluster | |
become: True | |
tasks: | |
- name: Updating the system | |
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600 | |
- name: Upgrading the system | |
apt: upgrade=dist force_apt_get=yes | |
- name: Installing aptitude using apt | |
apt: name=aptitude state=latest update_cache=yes force_apt_get=yes |
This file contains 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 characters
[defaults] | |
inventory = hosts | |
remote_user = vagrant | |
private_key_file = /home/${USER}/.vagrant.d/insecure_private_key | |
host_key_checking = False |
This file contains 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 characters
[cluster] | |
master ansible_host=127.0.0.1 ansible_port=2222 | |
worker ansible_host=127.0.0.1 ansible_port=2200 |
This file contains 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 characters
Vagrant.configure("2") do |config| | |
config.ssh.insert_key = false | |
config.vm.define "master" do |master| | |
master.vm.box = "ubuntu/bionic64" | |
end | |
config.vm.define "worker" do |worker| | |
worker.vm.box = "ubuntu/bionic64" | |
end | |
config.vm.network "public_network" | |
config.vm.provider "virtualbox" do |vb| |
This file contains 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 characters
# Install Vagrant | |
# Download the latest version of vagrant from : https://www.vagrantup.com/downloads.html | |
# If you using debian ( Download x.deb ), Otherwise download Binary file an place in executable path in system. | |
# Installation ( Debian ) | |
$ sudo dpkg -i ./vagrant-x.deb | |
# Install VM ( Ubuntu 18.04 ) | |
$ vagrant init |
This file contains 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 characters
# Install Some Dependencies | |
$ sudo apt-get -y install gcc make linux-headers-$(uname -r) dkms | |
# Install Virtual Box | |
$ sudo apt install ./virtualbox-5.2_5.2.44-139111~Ubuntu~bionic_amd64.deb | |
# To Check | |
$ VBoxManage -v | |
5.2.44r139111 |
This file contains 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 characters
## Installing code-server with persistent storage, because this gives us the freedom to access code files from desired directories | |
-------------------------------------------------------------------------------------- | |
# We already create PersistentVolume, but we need a another claim for code-server | |
# YAML for Persistent Volume Claim ( code-server-pvc.yml ) | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: |
This file contains 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 characters
# I m installing linkding with persistent storage ( To know about What persistent storage is, check out my Kubernetes 101 post ) | |
# YAML for Persistent Volume ( pv.yml ) | |
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: data | |
spec: | |
accessModes: |