yeoman

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

README

Yeoman

Currently under research & development

Installing

go install

Development Requirements

Instructions
# Install NVM (or Node.JS)
# https://github.com/nvm-sh/nvm

# Install Yarn
# npm install -g yarn

# Install go
# https://golang.org/doc/install

# Install the protobuf-compiler (if wanting to use protoc)
sudo apt install protobuf-compiler

# Install build dependencies
go mod vendor

# Install additional dependencies (tools for Typescript protoc files)
yarn

# To generate protoc files
make protoc

# Run run tests
make test

# To compile yeoman
make

# To compile yeoman for all platforms
make all build

Configuration

Below represents the current full supported configuration.

  • logs_path is not yet used.
  • refresh_interval is in minutes
config_path: /opt/elementor/configs
logs_path: /opt/elementor/logs

elementor:
  service_port: ':9000'
  refresh_interval: 30

content_types:
  cisco_ios: cisco-ios
  cisco_iosxr: cisco-iosxr
  cisco_nxos: cisco-nexus
  juniper_junos: juniper-junos

Docker

Building the Images Locally
docker build  -t yeoman/elementor --file Dockerfile.elementor .
docker build  -t yeoman/envoy --file Dockerfile.envoy .
docker build  -t yeoman/ui --file Dockerfile.ui .
docker-compose
version: '3.7'

services:
  # web proxy
  traefik:
    image: traefik:v2.2
    command:
      - "--log.level=WARN"
      - "--log.filePath=/var/log/traefik.log"
      - "--accesslog=true"
      - "--accesslog.filepath=/var/log/access.log"
      - "--accesslog.bufferingsize=100"
      - "--api.insecure=false"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--providers.docker.network=public"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.web.http.redirections.entryPoint.to=websecure"
      - "--entrypoints.web.http.redirections.entryPoint.scheme=https"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.tlsChallenge.acme.tlschallenge=true"
      - "--certificatesresolvers.tlsChallenge.acme.email=REPLACE_WITH_EMAIL"
      - "--certificatesresolvers.tlsChallenge.acme.storage=/letsencrypt/acme.json"
      - "--certificatesresolvers.dnsChallenge.acme.dnschallenge=true"
      - "--certificatesresolvers.dnsChallenge.acme.dnschallenge.provider=vultr"
      - "--certificatesresolvers.dnsChallenge.acme.dnschallenge.delaybeforecheck=0"
      - "--certificatesresolvers.dnsChallenge.acme.email=REPLACE_WITH_EMAIL"
      - "--certificatesresolvers.dnsChallenge.acme.storage=/letsencrypt/acme.json"
      - "--ping=true"
    restart: unless-stopped
    networks:
      - web
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - v_traefik_certs:/letsencrypt
      - v_traefik_logs:/var/log
    environment:
      VULTR_API_KEY: REPLACE_WITH_VULTR_KEY
      VULTR_HTTP_TIMEOUT: 10

  # api server
  elementor:
    image: yeoman/elementor
    restart: unless-stopped
    networks:
      - yeoman
    ports:
      - 9000:9000
    volumes:
      - ./config.yaml:/opt/elementor/config.yaml
      - ./configs:/opt/elementor/configs

  # gRPC Proxy Server
  envoy:
    image: yeoman/envoy
    restart: unless-stopped
    networks:
      - yeoman
    ports:
      - 8080:8080
      - 9901:9901

  # Basic ReactJS client (Typescript)
  ui:
    image: yeoman/ui
    restart: unless-stopped
    networks:
      - yeoman
      - web
    ports:
      - 9001:5000
    # REACT_APP_API_SERVER should always point to the envoy
    # api server
    environment:
      REACT_APP_API_SERVER: envoy
    labels:
      traefik.enable: true
      traefik.http.services.yeoman.loadbalancer.server.port: 3000
      traefik.http.routers.yeoman.rule: Host(`YEOMAN.DOMAIN.COM`)
      traefik.http.routers.yeoman.entrypoints: websecure
      traefik.http.routers.yeoman.tls.certresolver: tlsChallenge

networks:
  yeoman:
  web:

volumes:
  v_traefik_certs:
  v_traefik_logs:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
internal
pkg
network
Package Yeoman provides a basic set of interfaces that you would normally find in elements such as routers and switches.
Package Yeoman provides a basic set of interfaces that you would normally find in elements such as routers and switches.
parser
Package parser provides implementations/utilities to read configuration files from various different network elements (Cisco IOS, Cisco IOS-XR, Juniper) and return a network.Element
Package parser provides implementations/utilities to read configuration files from various different network elements (Cisco IOS, Cisco IOS-XR, Juniper) and return a network.Element
routing
Package routing provides a basic interface to work with network routing prefixes
Package routing provides a basic interface to work with network routing prefixes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL