Skip to content
Snippets Groups Projects
Commit c26d2e17 authored by Smaine Kahlouch's avatar Smaine Kahlouch
Browse files

Addon Fabric8

parent 488da074
No related branches found
No related tags found
No related merge requests found
...@@ -5,8 +5,9 @@ Install and configure a kubernetes cluster including network overlay and optionn ...@@ -5,8 +5,9 @@ Install and configure a kubernetes cluster including network overlay and optionn
Based on [CiscoCloud](https://github.com/CiscoCloud/kubernetes-ansible) work. Based on [CiscoCloud](https://github.com/CiscoCloud/kubernetes-ansible) work.
### Requirements ### Requirements
Tested on debian Jessie and Ubuntu. Tested on **Debian Jessie** and **Ubuntu** (14.10, 15.04, 15.10).
The target servers must have access to the Internet in order to pull docker imaqes The target servers must have access to the Internet in order to pull docker imaqes
The firewalls are not managed, you'll need to implement your own rules the way you used to.
Ansible v1.9.x Ansible v1.9.x
...@@ -108,6 +109,14 @@ iptables -nLv -t nat ...@@ -108,6 +109,14 @@ iptables -nLv -t nat
``` ```
#### Available addons
By default 2 addons are enabled
* [Kube-ui](https://github.com/kubernetes/kube-ui) which is a simple dashboard which shows kubernete's components, url : ``` http://[master_ip]:8080/ui```
* [Fabric8](http://fabric8.io/), console management for kubernetes : ```http://[master_ip]:8080/api/v1/proxy/namespaces/kube-system/services/fabric8```
Other addons : logging, monitoring
#### Calico networking #### Calico networking
Check if the calico-node container is running Check if the calico-node container is running
``` ```
...@@ -161,7 +170,7 @@ kubectl exec busybox -- nslookup kubernetes.default ...@@ -161,7 +170,7 @@ kubectl exec busybox -- nslookup kubernetes.default
``` ```
You should get an answer from the configured dns server You should get an answer from the configured dns server
Congrats ! now you can go through [kubernetes basics](http://kubernetes.io/v1.0/basicstutorials.html) Congrats ! now you can walk through [kubernetes basics](http://kubernetes.io/v1.0/basicstutorials.html)
Known issues Known issues
------------- -------------
......
...@@ -57,6 +57,9 @@ dns_replicas: 2 ...@@ -57,6 +57,9 @@ dns_replicas: 2
# Set to 'false' to disable default Kubernetes UI setup # Set to 'false' to disable default Kubernetes UI setup
enable_ui: true enable_ui: true
# Set to 'false' to disable Fabric8 console setup
enable_fabric8: true
# Set to 'false' to disable default Elasticsearch + Kibana logging setup # Set to 'false' to disable default Elasticsearch + Kibana logging setup
enable_logging: false enable_logging: false
......
...@@ -57,6 +57,9 @@ ...@@ -57,6 +57,9 @@
# Set to 'false' to disable default Kubernetes UI setup # Set to 'false' to disable default Kubernetes UI setup
# enable_ui: true # enable_ui: true
# Set to 'false' to disable Fabric8 console setup
# enable_fabric8: true
# Set to 'false' to disable default Elasticsearch + Kibana logging setup # Set to 'false' to disable default Elasticsearch + Kibana logging setup
# enable_logging: false # enable_logging: false
......
apiVersion: "v1"
kind: "ReplicationController"
metadata:
annotations: {}
labels:
component: "console"
provider: "fabric8"
name: "fabric8"
namespace: "kube-system"
spec:
replicas: 1
selector:
component: "console"
provider: "fabric8"
template:
metadata:
annotations: {}
labels:
component: "console"
provider: "fabric8"
spec:
containers:
-
args: []
command: []
env:
-
name: "OAUTH_PROVIDER"
value: "basic"
-
name: "OAUTH_AUTHORIZE_URI"
value: "https://vagrant.f8:8443/oauth/authorize"
-
name: "GOOGLE_OAUTH_CLIENT_SECRET"
value: ""
-
name: "GOOGLE_OAUTH_REDIRECT_URI"
value: "https://fabric8.vagrant.f8"
-
name: "OAUTH_CLIENT_ID"
value: "fabric8"
-
name: "GOOGLE_OAUTH_AUTHENTICATION_URI"
value: "https://accounts.google.com/o/oauth2/auth"
-
name: "GOOGLE_OAUTH_TOKEN_URL"
value: "https://www.googleapis.com/oauth2/v3/token"
-
name: "GOOGLE_OAUTH_CLIENT_ID"
value: ""
-
name: "GOOGLE_OAUTH_SCOPE"
value: "profile"
-
name: "KUBERNETES_NAMESPACE"
valueFrom:
fieldRef:
fieldPath: "metadata.namespace"
image: "docker.io/fabric8/fabric8-console:v1.0.26"
name: "fabric8-container"
ports:
-
containerPort: 9090
name: "http"
securityContext: {}
volumeMounts: []
imagePullSecrets: []
nodeSelector: {}
volumes: []
apiVersion: "v1"
imagePullSecrets: []
kind: "ServiceAccount"
metadata:
annotations: {}
labels: {}
name: "fabric8"
namespace: "kube-system"
secrets: []
apiVersion: "v1"
kind: "Service"
metadata:
annotations: {}
labels:
component: "console"
provider: "fabric8"
name: "fabric8"
namespace: "kube-system"
spec:
deprecatedPublicIPs: []
ports:
-
port: 80
protocol: "TCP"
targetPort: 9090
selector:
component: "console"
provider: "fabric8"
apiVersion: "v1"
kind: "ReplicationController"
metadata:
annotations: {}
labels:
component: "templates"
provider: "fabric8"
name: "templates"
namespace: "kube-system"
spec:
replicas: 1
selector:
component: "templates"
provider: "fabric8"
template:
metadata:
annotations: {}
labels:
component: "templates"
provider: "fabric8"
spec:
containers:
-
args: []
command: []
env:
-
name: "DATA_DIR"
value: "/data/templates"
-
name: "KUBERNETES_NAMESPACE"
valueFrom:
fieldRef:
fieldPath: "metadata.namespace"
image: "docker.io/fabric8/templates:2.2.19"
name: "templates"
ports:
-
containerPort: 8080
name: "http"
-
containerPort: 8778
name: "jolokia"
securityContext: {}
volumeMounts:
-
mountPath: "/data"
name: "template-data"
readOnly: false
imagePullSecrets: []
nodeSelector: {}
volumes:
-
gitRepo:
repository: "https://github.com/fabric8io/templates.git"
revision: "master"
name: "template-data"
apiVersion: "v1"
kind: "Service"
metadata:
annotations: {}
labels:
component: "templates"
provider: "fabric8"
name: "templates"
namespace: "kube-system"
spec:
deprecatedPublicIPs: []
ports:
-
port: 80
protocol: "TCP"
targetPort: 8080
selector:
component: "templates"
provider: "fabric8"
---
- name: Fabric8 | Write service accounts file
copy:
src: fabric8-svc-accounts.yaml
dest: "{{ kube_manifest_dir }}/fabric8-svc-accounts.yaml"
register: fabric8_svcaccts_def
- name: Fabric8 | Write service file
copy:
src: fabric8-svc.yaml
dest: "{{ kube_manifest_dir }}/fabric8-svc.yaml"
register: fabric8_svc_def
- name: Fabric8 | templates | Write service file
copy:
src: fabric8-templates-svc.yaml
dest: "{{ kube_manifest_dir }}/fabric8-templates-svc.yaml"
register: fabric8_tmpl_svc_def
- name: Fabric8 | Write controller file
copy:
src: fabric8-rc.yaml
dest: "{{ kube_manifest_dir }}/fabric8-rc.yaml"
register: fabric8_rc_def
- name: Fabric8 | templates | Write controller file
copy:
src: fabric8-templates-rc.yaml
dest: "{{ kube_manifest_dir }}/fabric8-templates-rc.yaml"
register: fabric8_tmpl_rc_def
- name: Fabric8 | Create/update service account
kube:
namespace: kube-system
resource: serviceaccounts
name: fabric8
filename: "{{ kube_manifest_dir }}/fabric8-svc-accounts.yaml"
state: "{{ fabric8_svcaccts_def.changed | ternary('latest','present') }}"
ignore_errors: yes
- name: Fabric8 | Create/update service
kube:
namespace: kube-system
resource: svc
name: fabric8
filename: "{{ kube_manifest_dir }}/fabric8-svc.yaml"
state: "{{ fabric8_svc_def.changed | ternary('latest','present') }}"
- name: Fabric8 | templates | Create/update service
kube:
namespace: kube-system
resource: svc
name: templates
filename: "{{ kube_manifest_dir }}/fabric8-templates-svc.yaml"
state: "{{ fabric8_tmpl_svc_def.changed | ternary('latest','present') }}"
- name: Fabric8 | Create/update replication controller
kube:
namespace: kube-system
resource: rc
name: fabric8
filename: "{{ kube_manifest_dir }}/fabric8-rc.yaml"
state: "{{ fabric8_rc_def.changed | ternary('latest','present') }}"
- name: Fabric8 | templates | Create/update replication controller
kube:
namespace: kube-system
resource: rc
name: templates
filename: "{{ kube_manifest_dir }}/fabric8-templates-rc.yaml"
state: "{{ fabric8_tmpl_rc_def.changed | ternary('latest','present') }}"
...@@ -43,3 +43,6 @@ ...@@ -43,3 +43,6 @@
- include: monitoring.yml - include: monitoring.yml
when: enable_monitoring when: enable_monitoring
- include: fabric8.yml
when: enable_fabric8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment