项目作者: Teradata

项目描述 :
Template for UI applications in Vantage
高级语言: TypeScript
项目地址: git://github.com/Teradata/vantage-ui-template.git
创建时间: 2016-07-11T23:35:47Z
项目社区:https://github.com/Teradata/vantage-ui-template

开源协议:MIT License

下载


Teradata Vantage UI Template

Create Apps for Teradata Vantage using the Covalent UI Framework

Setup

  • Ensure you have Node 10.15.3 (on a Mac use Homebrew and brew install node@10.15.3)
  • Ensure you have NPM 6+ installed.
  • Install Docker Engine: https://docs.docker.com/engine/installation/
  • Install Angular CLI npm i -g @angular/cli
  • Install Typescript npm i -g typescript
  • Install TSLint npm i -g tslint
  • Install Node packages npm ci

Development

  1. Update the serverUrl variable in the proxy.conf.js and loginUrl variable in the cypress.env.json to point to your vantage environment.

  2. Run local webserver npm run serve

  3. In Chrome go to http://localhost:4200

Build Container Image

  1. Clean up the deploy directory.

Mac:

  1. rm -rf ./deploy/
  2. mkdir ./deploy/

Win:

  1. rmdir /S .\deploy\
  2. mkdir .\deploy\
  1. Build Angular assets
  1. npm run build:prod
  1. Move assets into deploy directory.

Mac:

  1. cp -r ./docker/* ./deploy
  2. cp -r ./dist/* ./deploy

Win:

  1. copy .\docker\* .\deploy
  2. copy .\dist\* .\deploy
  1. Build docker image with assets
    • Replace WEB_SERVER with nodejs or nginx depending on your need
    • Replace IMAGE_NAME with a name of your choice

Mac:

  1. docker build -f deploy/WEB_SERVER/Dockerfile -t IMAGE_NAME ./deploy

Win:

  1. docker build -f deploy\WEB_SERVER\Dockerfile -t IMAGE_NAME .\deploy
  1. Run command docker images and see it listed

  2. You can run commands locally now like:

    • Replace YOUR_BASE_URL with your Vantage Environment Base URL
    • Replace IMAGE_NAME with the image name you used on step 3.
  1. docker run -e APPCENTER_BASE_URL=YOUR_BASE_URL -p 49160:8080 -d IMAGE_NAME
  2. docker exec -it CONTAINER_ID /bin/bash

Deployment to Registry

  1. Tag docker image and push to a repository
    • Replace IMAGE_NAME with the image name you used when building the image.
    • Replace TAG with a tag for the image. e.g. Version number
    • Replace REPOSITORY with the URL of the repository where you need to push the image.
  1. docker tag IMAGE_NAME:latest REPOSITORY/IMAGE_NAME:TAG
  2. docker push REPOSITORY/IMAGE_NAME:TAG