- require specify Marathon API endpint via provider.config
- use python-request for communication with Marathon API
- there is no service discovery via environment variables like Kubernetes, at first we assume using mesos-dns
https://github.com/projectatomic/atomicapp/blob/master/atomicapp/providers/openshift.py#L66
request: GET http://example.com/oapi/v1
response:
HTTP/1.1 200 OK
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 characters
| # https://pypi.python.org/pypi/websocket-client/ | |
| import websocket | |
| import ssl | |
| def on_message(ws, message): | |
| print message | |
| args = {"token": "", | |
| "namespace": "testing", | |
| "pod": "nonroot-nginx-1-pftqg", |
There was major refactoring of OpenShift provider in AntomicApp 0.3.0.
In that version provider stopped using oc command and started using
OpenShift API directly.
In this version we permanently disabled TLS/SSL verification.
Now with 0.3.1 TLS/SSL verification is enabled by default and there are options that allow user to add CA certificate or disable verification completely.
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 characters
| %define name openshift2nulecule | |
| %define version 0.0.1 | |
| %define release 1 | |
| Summary: Tool to create Nulecule from OpenShift | |
| Name: %{name} | |
| Version: %{version} | |
| Release: %{release} | |
| License: LGPL3 | |
| BuildArch: noarch |
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 characters
| apiVersion: v1 | |
| clusters: | |
| - cluster: | |
| server: http://10.1.2.3:8080 | |
| name: k8s | |
| contexts: | |
| - context: | |
| cluster: k8s | |
| user: "" | |
| name: k8s |
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 characters
| apiVersion: v1 | |
| kind: DeploymentConfig | |
| metadata: | |
| labels: | |
| app: nginx | |
| name: nginx | |
| spec: | |
| replicas: 1 | |
| selector: | |
| app: nginx |
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 characters
| [helloflask-app] | |
| redis_master_port = 6379 | |
| image = tomaskral/helloflask | |
| serviceport = 80 | |
| redis_master_host = redis-master | |
| redis_slave_host = redis-slave | |
| redis_slave_port = 6379 | |
| [redismaster-app] | |
| image = centos/redis | |
| hostport = 6379 |