GithubHelp home page GithubHelp logo

steeltoeoss / tooling Goto Github PK

View Code? Open in Web Editor NEW
12.0 8.0 7.0 863 KB

Steeltoe developer tool collection

Home Page: https://steeltoe.io/

License: Apache License 2.0

C# 97.92% PowerShell 1.57% Smalltalk 0.51%
docker cli cloud-foundry services dotnet application-deployment steeltoe tooling

tooling's Introduction

Steeltoe Tooling is no longer actively maintained by VMware, Inc.

Build Status

About

Tools for Steeltoe Developers.

The goal of this project is to provide tools to assist Steeltoe Developers. The current focus is an API and CLI to help with deploying Steeltoe Applications locally to Docker.

Subsequent goals include:

  • a Visual Studio plugin leveraging the API

  • plugins for other IDES, such as Visual Studio Code and JetBrains Riser

  • Visual Studio/DotNET templates

Install

Install Steeltoe Tooling CLI from Source
$ ./scripts/install.ps1

Further Instructions for Using Steeltoe Tooling CLI

See Steeltoe Tooling Documentation for more user and developer information.

tooling's People

Contributors

ccheetham avatar ddieruf avatar jkonicki avatar timhess avatar trevormarshall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tooling's Issues

add descriptions to service type list

For example, change

% steeltoe list-service-types
config-server
service-registry

to

% steeltoe list-service-types
config-server (Spring Cloud Config Server)
service-registry (Netflix Eureka Server)

add deploy-all and undeploy-all commands

Currently, if you have n services, you would deploy them:

deploy <service-1>
deploy <service-2>
...
deploy <service-n>

Adding support for an *-all variant would simplify above to:

deploy-all

Service commands should also work on individual services

Currently, deploy, undeploy, and status work on all defined services. Enhance the commands so that can can optionally work on an individual service.

$ st status
foo-config online
foo-dash online
foo-redis online
foo-mssql online
foo-zip online
foo-eureka online

$ st status foo-config
foo-config online

Run multi-service operations in parallel

Currently, multi-service operations are run serially. E.g., when deploying services, each service is deployed before deploying the next one. Running the deployments in parallel will improve CLI response.

fix feature tests on Windows

Many feature tests are failing on Windows due to the tests not expecting carriage returns (\r).
E.g., a test expecting "Steeltoe Developer Tools\n" will fail on Windows because the actual string is "Steeltoe Developer Tools\r\n".

Convert command semantics from per-service to per-environment

Basically, migrate from:

  add-service         Add a service.
  check-service       Check the status of a service in the target environment.
  list-service-types  List available service types.
  list-services       List available services.
  list-targets        List available target environments.
  remove-service      Remove a service.
  set-target          Set the target environment.
  start-service       Start a service in the target environment.
  stop-service        Stop a service in the target environment.

to something like

  add                 Add a service.
  disable             Disable a service.
  enable              Enable a service.
  remove              Remove a service.
  status              Show status and other information of a service in the target environment.
  start               Start enabled services in the target environment.
  stop                Stop running services in the target environment.
  target              View or set the target environment.

Add support for overriding tool configuration file path

Currently, the tooling look in the current directory for the file .steeltoe.tooling.yml.

Supporting something like:

$ steeltoe -C <myconfigpath> ...

would permit being to able to somethine like:

$ steeltoe -C my-test-services.yml  ...
$ steeltoe -C my-demo-services.yml  ...

cf command errors not handled

For example, specifically to cloud foundry CLI cf:

  • not logged in
  • no target specified or no longer exists
  • general failures, e.g. network failure

Ability to dynamically retrieve env/config details from PCF

As a .NET Developer, I would like to be able to retrieve the environment info (eg: VCAP_APPLICATION and VCAP_SERVICES) from an application instance running in Pivotal Cloud Foundry and apply it to my local instance in a non-static way.

Possibly implemented as an on-demand command like st mimic <app-name-on-pcf> or as an msbuild task -- either of which could populate a file that then needs to be included in app configuration

https://stackoverflow.com/questions/52919309/is-it-possible-to-initialize-net-core-non-pcf-deployed-application-with-values/52972109

Add support for different docker images for a service type

Currently, a service type maps to a single docker image name. That name is expected to resolve to a docker image for both Linux and Windows docker containers.

However, in some cases it'd be easier for docker image construction if a service type could map to different image names depending on the container OS.

A specific example are Steeltoe Redis Server docker images:

  • Linux -> steeltoeoss/redis-server:4.0.11-linux
  • Windows -> steeltoeoss/redis-server:3.0.504-windows

Support visible docker container output

When deploying service locally to docker, it'd be useful for a developer to see the output from the docker containers. The output could be obtained from per-container log files, or perhaps from per-container terms.

Create Dockerfile for .NET Core projects

Creating a dockerfile for each project in the samples (MusicStore, FreddysBBQ...) will improve the deployment in a containerzed environment. As the others components (dabatase, configuration..) are docker images, the others ones will be very good.

Services running in Docker do not expose their ports

E.g,:

% steeltoe start-service MyConfigServer

% docker ps
CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS              PORTS               NAMES
a2dc22068d0a        steeltoeoss/configserver   "java -jar configser…"   6 seconds ago       Up 6 seconds        8888/tcp            MyConfigServer

% telnet localhost 8888
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host

Add a doctor command

Command should check development environment and report any potential problems. In addition, any other useful information such as tool versions should be reported.

CLI feedback for missing environment support for service needs improvement

If an environment is missing support for a service, the CLI reports unhelpful message:

$ st add trace zipkin
$ st target cloud-foundry
$  st deploy
Deploying service 'trace'
The given key 'zipkin' was not present in the dictionary.

A better message might be:

$  st deploy
Ignoring unsupported service 'trace'

Require a 'force' option when overriding service arguments

If a service already has existing arguments, the user should be required to indicate intent to replacing them.

E.g. assume a SQL Server service named database with defined docker launch args:

$ st add database mssql-server
$ st args docker database -- -e ACCEPT_EULA=y
Set the 'docker' deployment environment argument(s) for service 'database' to '-e ACCEPT_EULA=y'

The following should fail, but currently it simply overwrites existing args:

$ st args docker database -- -e ACCEPT_EULA=n
Set the 'docker' deployment environment argument(s) for service 'database' to '-e ACCEPT_EULA=n'

A better behavior would be something like:

$ st args docker database -- -e ACCEPT_EULA=n
'docker' deployment environment argument(s) for service 'database' already exist.
Run with '--force' to replace.
$ st args docker database --force -- -e ACCEPT_EULA=n
Set the 'docker' deployment environment argument(s) for service 'database' to '-e ACCEPT_EULA=n'

cf service type hard-coded to p-config-server

Before adding other Cloud Foundry services, there needs to be a mapping from the general service type (eg, cloud-foundry-config-server) to its Cloud Foundry type (eg, p-config-server).

docker sanity check passes even if docker daemon not running

sanity check passes when docker targeted ...

$  steeltoe target docker
checking docker ... Docker version 18.06.0-ce, build 0ffa825
Target deployment environment set to 'docker'.

however subsequent command will fail ...

$ steeltoe deploy config
docker error: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.38/containers/json?filters=%7B%22name%22%3A%7B%22%5E%2Fconfig%24%22%3Atrue%7D%7D: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Running deploy, undeploy, or status when no target set results in stacktrace

To reproduce:

% steeltoe init
Project initialized for Steeltoe Developer Tools
% steeltoe add config config-server
Added config-server service 'config'
% steeltoe deploy
System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Steeltoe.Tooling.ServiceManager.GetServiceBackend() in ...

add context to verbose output

Using the verbose option (-v|_--verbose) includes underlying commands and their output. However without some context as to why the command is being run, the verbose output can be white noise.

E.g., when tooling is polling a backend to get the status of a service, it'd be useful is the verbose output included something like "getting status" or "waiting for service to come online".

Externalize registry configurations info config files

Currently environment and service type registries are hard coded. Move them into a config file that ships with the tool. This will help lay the ground work for post-tool install customizations of environments and service types.

display delegated command and command output

It'd be useful to see what st is doing on behalf of the developer. E.g., when deploying a service to Cloud Foundry, the command cf create-service ... is run when a service is deployed.

Example that uses a verbose switch:

$ st deploy
Deploying service 'myredis'
$ st undeploy
Undeploying service 'myredis'

$ st deploy -v
Deploying service 'myredis'
cf create-service p-redis shared-vm myredis
Creating service instance myredis in org pivot-ccheetham / space playground as [email protected]...
OK
$ st undeploy
Undeploying service 'myredis'
f delete-service myredis -f
Deleting service myredis in org pivot-ccheetham / space playground as [email protected]...
OK

cloud foundry backend does not detect STARTING state

After deploying a service to cloud foundry, the service appears to be OFFLINE until the service is created at which time it becomes ONLINE. After deploying a service, its state should be STARTING until it is created.

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.