Demo application to show how to build and deploy a 3-tiers application using startx/sv-nodejs s2i builder (source-to-image) to build 2 applications based on sxapi micro-service framework on top of an openshift platform.
This demo intend to show how you can run an full application using Openshift PAAS
or Red Hat Openshift as
building and running plateform. By using docker, managed by
Kubernetes and superset with CI/CD + security and management feature bringed by
Openshift layer, you will see how to use the latest technologies
to run scalable, resilient and secured application on top of a smart and distributed architecture.
You will also discovert a simple API framework useful for creating
simple and extensible API using a micro-service architecture. SXAPI project
is based on nodejs technologie and is
available as a docker image on dockerhub (sxapi image) or as an
npm module (sxapi npm module)
.---------------. .---------------. .---------------. .-,( ),-.
| db | | API | | frontend | .-( )-.
|---------------|<---------|---------------| |---------------|------------>( internet )
| mariadb | | nodejs / json | | nodejs / html | '-( ).-'
'---------------' '---------------' '---------------' '-.( ).-'
^ |
'--------------------------------------------------'
Running the complete agenda of this demo require your local or demo workstation to meet the following requirements :
git
command must be installed- internet access must be configured
docker
command must be installed and running (for docker and s2i deployement strategy). You must have access to the runningdocker
daemon with access to the dockerhub public registry. If you don't have docker runtime, please follow docker installation guide for CentOS, RHEL, Windows or MacOS.s2i
command must be installed (for s2i deployement strategy)oc
command must be installed (for openshift deployement strategies)
All openshift template is self sufficient and we can use all of them without having a local copy of the source code. However, for all docker build and s2i build strategy, whe need to have a local copy of source code. In order to run the complete demo agenda, you need to install a local copy of the source code.
cd ~
git clone https://github.com/startxfr/sxapi-demo-openshift.git
cd sxapi-demo-openshift
You will find in our Openshift installation guide instructions for creating an Openshift cluster using Openshift Online, Openshift Origin on AWS as well as Minishift configurations.
In openshift Origin, if you want to visualize your objects in the web-console, you should create the project from the Web console.
- Connect to the web console using
https://openshift.demo.startx.fr:8443
- Authenticate using the system admin user
system
with passswordadmin
- Create a new project (right panel) and name it. We will assume your project name for this demo will be
demo
# <user> your openshift username
# <pwd> your openshift password
# <master_domain> your master domain name
# <project> your project name
# ex: oc login -u system:admin https://openshift.demo.startx.fr:8443
# ex: oc new-project demo; oc project demo
oc login -u <user>:<pwd> https://<master_domain>
oc new-project <project>
oc project <project>
This section will help you start a build and deploy of this demo application stack using various build and deployement strategies.
- docker strategy : Deploy demo application using docker command only
- openshift build strategy : Deploy demo application using openshift build and deployement configuration
- openshift pipeline strategy : Deploy demo application using openshift pipeline configuration stategy
If you run into difficulties installing or running this demo, you can create an issue.
- amazon web-services - Infrastructure layer
- docker - Container runtime
- kubernetes - Container orchestrator
- openshift - Container plateform supervisor
- nodejs - Application server
- sxapi - API framework
Read the contributing guide for details on our code of conduct, and the process for submitting pull requests to us.
This project is mainly developped by the startx dev team. You can see the complete list of contributors who participated in this project by reading CONTRIBUTORS.md.
This project is licensed under the GPL Version 3 - see the LICENSE.md file for details