* Add support for container networking
- This adds all containers in the tye.yaml to the same container network.
- Container networking only works with a single replica today since the containers are named after their replicas.
- Use the container host name and port when injecting env variables. This handles the replica case by falling back to the host ip and port.
- This cleans up container to container communication when migrating docker-compose files.
- Don't override assign container port if already set.
- Remove StopAsync from TyeHost and exposed DisposeAsync. This patterns removes common clean up and hanging issues that occur.
- Cleaned up run tests to use similar code to run, clean up and capture logs.
* Move where we handle errors while shutting down the host
* Fixed project -> container networking issue
- Only use service name as the host name if both target and source re containers
* Formatting...
* Add service definition to the logs
* Added env variables to disable console colors for process run
* Hit the backend before the frontend
* Small cleanup
- Update docs to use host name for redis cli
- Show docker network and network alias in the API
* DockerImagePuller checks if the images is already installed before pull it
* Use --filter and --format options to filter and format the output docker images command
* Optimize usings
* Remove unused variable
* Improve PullContainerAsync implementation and also throws CommandException if docker images command failed
* Improve the approach to determine if it's installed and print the output of this command images in case of failure
* Pull docker images before running
- This step also validates that docker is installed before trying to pull and before running so that logic can be removed from the DockerRunner.
- Let the application exit if it tye run fails to start.
Fixes#222
It's against the law! using multiple replicas with dapr won't work correctly
with pub-sub until we add first-class sidecar handling to the hosting model.
This makes us fail with a reasonable error message for now.
* Make ports go away
- Make AutoAssignPort true by default for binding and ingress. If a binding is defined auto assign the port. This will of course be ignored if there's a port defined.
- Don't auto assign a port if it's there's a connection string defined.
* Add Dapr integration to Tye
Adds a new `extensions` integration point. Currently all extensbility has
to be inside the Tye codebase. There's no functionality for loading or distributing
plugins.
Enable dapr for an application like:
```yaml
name: test_app
extensions:
- name: dapr
```
The dapr extension currently accepts and requires no additional options, and applies
to all services defined in the application.
What it does:
- In local run: starts a dapr sidecar for each project that does http
- In local run: sidecars start in the directory of tye.yaml, so dapr will look for
component manifests in ./components (relative to tye.yaml
- In deployment: adds required annotations to deployments
Some new features that were added to tye to enable this:
- Config: Ability to parse and conditionally run extensions
- Run: Ability to token replace env-vars into command line args
- Deploy: Ability to configure labels and annotations
* format
* Massage labesl:
* PR feedback
* Fix tests
* Purge hanging replicas
* Use dictionary for event serialization
* Subscribing to replica events instead of waiting for arbitrary time in tests
* Only return list of running containers from DockerAssert
* use IDictionary instead of deserializing to ReplicaStatus when removing stale replicas
* Exit logs loop in DockerRunner if container is killed
* Created a object graph visitor to ignore also empty collections on serialization. Unify creation of serilizer/deserialization objects with specified configuration
* Update OmitDefaultAndEmptyArrayObjectGraphVisitor.cs
* Update YamlSerializer.cs
* Fix tests with EOL issues on different SO #235
Co-authored-by: Justin Kotalik <jkotalik12@gmail.com>
* Improve container base image detection
- Improve ASP.NET project detection to work with netcoreapp2.1 applications
- Grab the target framework name and version from the project separately so we can use the vesion to determine the base image
- Updated Dockerfile generation and tye run --docker to work with different container versions based on the TFM version.
* Remove reading of launch settings
- If bindings are specified, add an http and https binding with autodetect port to true.
- Prefer HTTP over HTTPS for ingress
Fixes: #189Fixes: #153
This change rejiggers the docker build infrastructure to publish the project
and generate a Dockerfile in the same directory. This way they can't be on
separate drives!
Also added some focused tests for single-phase docker build.