{"id":14984539,"url":"https://github.com/lresende/ansible-kubernetes-cluster","last_synced_at":"2025-04-10T21:15:36.763Z","repository":{"id":146983120,"uuid":"132653088","full_name":"lresende/ansible-kubernetes-cluster","owner":"lresende","description":"Ansible roles to deploy Kubernetes, JupyterHub, Jupyter Enterprise Gateway and Spark on Kubernetes cluster","archived":false,"fork":false,"pushed_at":"2020-12-04T18:02:19.000Z","size":403,"stargazers_count":39,"open_issues_count":3,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-10T21:15:33.786Z","etag":null,"topics":["ansible","ansible-roles","cloud","deploy-kubernetes","deploying-kubernetes","elyra","enterprise-gateway","jupyter-enterprise-gateway","jupyterhub","jupyterlab","kubernetes","kubernetes-cluster","kubernetes-deployment","rhel","spark","spark-on-kubernetes"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lresende.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-08T19:06:28.000Z","updated_at":"2025-03-10T17:42:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"254083c3-7618-407a-91d7-4985ec135442","html_url":"https://github.com/lresende/ansible-kubernetes-cluster","commit_stats":{"total_commits":116,"total_committers":2,"mean_commits":58.0,"dds":"0.017241379310344862","last_synced_commit":"7281197167f30be902b39335a1ba186bb5aab052"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lresende%2Fansible-kubernetes-cluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lresende%2Fansible-kubernetes-cluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lresende%2Fansible-kubernetes-cluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lresende%2Fansible-kubernetes-cluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lresende","download_url":"https://codeload.github.com/lresende/ansible-kubernetes-cluster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248298312,"owners_count":21080320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-roles","cloud","deploy-kubernetes","deploying-kubernetes","elyra","enterprise-gateway","jupyter-enterprise-gateway","jupyterhub","jupyterlab","kubernetes","kubernetes-cluster","kubernetes-deployment","rhel","spark","spark-on-kubernetes"],"created_at":"2024-09-24T14:09:14.205Z","updated_at":"2025-04-10T21:15:36.746Z","avatar_url":"https://github.com/lresende.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy a self-service Notebook environment on Kubernetes cluster\n\nThis repository defines multiple [Ansible Roles](https://www.ansible.com/) to help deploying and configuring\na Kubernetes cluster with [JupyterHub](https://github.com/jupyterhub/jupyterhub),\n[Jupyter Enterprise Gateway](https://github.com/jupyter/enterprise_gateway) and\n[Elyra](https://github.com/elyra-ai/elyra) extensions to \n[JupyterLab Notebooks](https://github.com/jupyterlab/jupyterlab).\n\n![Deployment Diagram](./docs/images/elyra-deployment-diagram.png)\n\n# Requirements\n\nYou will need a driver machine with ansible installed and a clone of the current repository:\n\n* If you are running on cloud (public/private network)\n  * Install ansible on the edge node (with public ip)\n* if you are running on private cloud (public network access to all nodes)\n  * Install ansible on your laptop and drive the deployment from it\n\n### Installing Ansible on RHEL\n\n```\ncurl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\nsudo rpm -i epel-release-latest-7.noarch.rpm\nsudo yum update -y\nsudo yum install -y  ansible\n```\n\n### Installing Ansible on Mac\n\n* Install Annaconda\n* Use pip install ansible\n\n```\npip install --upgrade ansible\n```\n\n### Updating Ansible configuration\n\nIn order to have variable overriding from host inventory, please add the following configuration into your ~/.ansible.cfg file\n\n```\n[defaults]\nhost_key_checking = False\nhash_behaviour = merge\ncommand_warnings = False\n```\n\n### Supported/Tested Platform\n\n* RHEL 7.x\n* Ansible 2.10.3\n\n# Deployment\n\n## Available deployment Ansible Roles\n* **common:** Basic OS updates and configurations common to all scenarios\n* **kubernetes:** Basic Kubernetes platform and utilities required to run either Jupyter or Spark environments\n* **jupyter-enterprise-gateway:** Deploy necessary images for Jupyter Enterprise Gateway and supported kernels\n* **jupyterhub:** Deploy JupyterHub environment using custom Notebook image for remote kernels (using Enterprise Gateway)\n\n\n## Defining deployment metadata (host inventory)\n\nAnsible uses 'host inventory' files to define the cluster configuration, nodes, and groups of nodes\nthat serves a given purpose (e.g. master node, worker nodes, etc).\n\nBelow is a host inventory sample definition:\n\n```\n[all:vars]\n\n[master]\nlresende-kube-node-1   ansible_host=9.30.109.214   ansible_host_private=172.16.186.211\n\n[nodes]\nlresende-kube-node-2   ansible_host=9.30.123.95   ansible_host_private=172.16.202.136\nlresende-kube-node-3   ansible_host=9.30.188.28   ansible_host_private=172.16.202.144\nlresende-kube-node-4   ansible_host=9.30.188.36   ansible_host_private=172.16.203.8\nlresende-kube-node-5   ansible_host=9.30.188.38   ansible_host_private=172.16.210.6\n```\n\n## Deployment of Kubernetes and a self-service notebook environment \n\nThe sample `setup-kubernetes.yml` playbook deploys a Kubernetes cluster and configure JupyterHub\nand Elyra extensions to JupyterLab Notebooks.\n\n```yaml\n- name: setup kubernetes\n  hosts: all\n  remote_user: root\n  roles:\n    - role: common\n    - role: kubernetes\n    - role: jupyter-enterprise-gateway\n    - role: jupyterhub\n```\n\n### Deploying\n\n```\nansible-playbook --verbose \u003cdeployment playbook.yml\u003e -i \u003chosts inventory\u003e\n```\n\nExample:\n\n```\nansible-playbook --verbose setup-kubernetes.yml -c paramiko -i hosts-fyre-kubernetes\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flresende%2Fansible-kubernetes-cluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flresende%2Fansible-kubernetes-cluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flresende%2Fansible-kubernetes-cluster/lists"}