Giter Site home page Giter Site logo

dgutride / fabric8-runtime-console Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fabric8-ui/fabric8-runtime-console

0.0 1.0 0.0 3.86 MB

the angular 2 runtime console for Builds, Pipelines, Runtime resources

Shell 0.63% TypeScript 73.44% JavaScript 0.42% Groovy 0.11% HTML 20.83% CSS 4.58%

fabric8-runtime-console's Introduction

Fabric8 Runtime Console

This is the new angular 2 based console for building and running applications on kubernetes and openshift

Included in this stack are the following technologies:

Quick Start

Make sure you have node version >= 6.x.x and Yarn version >= 0.18.1

Clone/download the repo start editing app.component.ts inside /src/app/

# clone our repo
git clone https://github.com/fabric8-ui/fabric8-runtime-console.git
cd fabric8-runtime-console

# install the dependencies
yarn

# start the server
npm start

Then to be able to use the kubernetes / openshift back end for builds and runtime resources you will need to run a proxy in another shell:

Check you can connect to some OpenShift cluster

To run this console you need an OpenShift cluster to play with. If you have used oc login to connect to something and can run something like:

oc get node
oc get pod

Then you're good to go. If not consider installing and starting minishift and then running the oc login command it tells you on startup so that you can run the above commands.

Start Caddy

When using the console inside a docker image we use Caddy to serve up the static contents and to proxy from the browser to the back end REST API.

If you download it make sure to select the prometheus plugin and add it to your $PATH then you can run it as follows:

./caddy.sh

This script will also use the current kuberntes cluster by using kubectl (see the above kubectl section for more background).

Open the console in your browser

Now go to http://0.0.0.0:4200 or http://localhost:4200 in your browser.

If you don't have a kubernetes or openshift cluster

To setup your own local kubernetes or openshift cluster the fabric8 getting started guide

Or you can setup kubectl or oc to point to a known cluster.

Table of Contents

File Structure

We use the component approach in our starter. This is the new standard for developing Angular apps and a great way to ensure maintainable code by encapsulation of our behavior logic. A component is basically a self contained app, usually in a single file or a folder with each concern as a file: style, template, specs, e2e, and component class.

ipaas-client/
 │
 ├──docs/                         * our documentation
 |   ├──commands.md               * additional cli commands available to us
 |   ├──contributing.md           * contribution guidelines
 |   ├──entities.md               * entities/models and their relationships for reference
 │   ├──faq.md                    * frequently asked questions about using ipaas
 │   ├──overview.md               * a technical overview for understanding the project
 │   └──typescript.md             * some typescript tips and resources
 │
 ├──src/                          * our source files that will be compiled to javascript
 │   │
 │   ├──app/                      * our Angular 2 application
 │   │   │
 │   │   ├──user/                 * an example 'user' component, based on an entity/model. can be nested further.
 │   │   │   ├──user.component.ts * the primary Angular component file; essentially a controller + directive combined
 │   │   │   ├──user.e2e.ts       * our e2e test for the user component
 │   │   │   ├──user.html         * our HTML user template for the user component
 │   │   │   └──user.spec.ts      * our unit test for the user component
 │   │   │
 │   │   ├──app.component.ts      * a simple version of our App component components
 │   │   ├──app.e2e.ts            * a simple end-to-end test for /
 │   │   └──app.spec.ts           * a simple test of components in app.ts
 │   │
 │   ├──assets/                   * static assets are served here
 │   │   ├──robots.txt            * for search engines to crawl your website
 │   │   └──service-worker.js     * ignore this. Web App service worker that's not complete yet
 │   │
 │   ├──polyfills.ts      * our polyfills file
 │   └--index.html                * our primary layout that contains subviews
 │
 ├──.gitignore                    * let git know which files to ignore and not stage for commit
 ├──karma.conf.js                 * karma, our test runner, config file
 ├──LICENSE                       * iPaaS is available for use under the Apache 2.0 license
 ├──npm-shrinkwrap.json           * npm's way of allowing us to control exact versions of dependencies
 ├──package.json                  * what npm uses to manage it's dependencies
 ├──protractor.conf.js            * protractor, our e2e testing framework, config file
 ├──README.md                     * this exact file :)
 ├──tsconfig.json                 * typescript compiler config
 ├──tslint.json                   * typescript lint config

Getting Started

Dependencies

What you need to run this app:

Installing

  • fork the ipaas repo
  • clone your fork
  • yarn to install all dependencies
  • npm start to start the dev server

Running

After you have installed all dependencies you can now run the app. Run ng serve to start a local server which will watch, build (in-memory), and reload for you. The port will be displayed to you as http://0.0.0.0:4200 (or if you prefer IPv6, then it's http://[::1]:4200/).

Development

in one shell to expose your kubernetes cluster:

kubectl proxy
npm start

Production

ng serve --prod -aot

For a list of common commands, see here.

Testing

Watch and Run Tests

ng test

Run Tests

ng test --watch=false

For a list of common commands, see here.

Configuring

Configuration files live in /config. Configuration files are currently available for Webpack, Karma, and Protractor.

Contributing

Pull requests are always welcome. Please read through our Contribution guidelines in the /docs directory.

fabric8-runtime-console's People

Contributors

gashcrumb avatar jimmidyson avatar jstrachan avatar kahboom avatar rawlingsj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.