Skip to content

Commit

Permalink
Update OSCAR container
Browse files Browse the repository at this point in the history
  • Loading branch information
alpegon committed Oct 2, 2018
1 parent f5fbc20 commit 2c6b889
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ RUN pip3 install --no-cache-dir -r requirements.txt

COPY . /usr/src/app

RUN ln -s /usr/src/app/bin/docker-linux-amd64 /usr/bin/docker \
&& ln -s /usr/src/app/bin/faas-cli /usr/bin/faas-cli

EXPOSE 8080

ENTRYPOINT ["python3"]
Expand Down
Binary file added bin/docker-linux-amd64
Binary file not shown.
Binary file added bin/faas-cli
Binary file not shown.
40 changes: 40 additions & 0 deletions swagger_server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Overview
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the
[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This
is an example of building a swagger-enabled Flask server.

This example uses the [Connexion](https://github.com/zalando/connexion) library on top of Flask.

## Requirements
Python 3.5.2+

## Usage
To run the server, please execute the following from the root directory:

```
pip3 install -r requirements.txt
python3 -m swagger_server
```

and open your browser to here:

```
http://localhost:8080//ui/
```

Your Swagger definition lives here:

```
http://localhost:8080//swagger.json
```

## Running with Docker

To run the server on a Docker container, please execute the following from the root directory:

```bash
# building the image
docker build -t swagger_server .

# starting up a container
docker run -p 8080:8080 swagger_server
3 changes: 3 additions & 0 deletions templates/kubernetes_oscar.radl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ system front (
disk.0.applications contains (name = 'ansible.modules.grycap.kubeminio') and
disk.0.applications contains (name = 'ansible.modules.grycap.kubeventgateway') and
disk.0.applications contains (name = 'ansible.modules.grycap.kuberegistry') and
disk.0.applications contains (name = 'ansible.modules.grycap.kubeoscar') and
disk.1.size=20GB and
disk.1.fstype='ext4' and
disk.1.mount_path='/pv/minio' and
Expand Down Expand Up @@ -87,6 +88,8 @@ configure front (
public_access: false
type_of_node: "front"
svc_name: "registry.docker-registry"

- role: 'grycap.kubeoscar'

@end
)
Expand Down

0 comments on commit 2c6b889

Please sign in to comment.