Browse Source

Add instructions for released bits

pull/342/head
Ryan Nowak 7 years ago
parent
commit
7d2fb0818e
  1. 8
      docs/getting_started.md
  2. 31
      docs/tutorials/hello-tye/00_run_locally.md

8
docs/getting_started.md

@ -8,20 +8,20 @@ Tye is a tool that makes developing, testing, and deploying microservices and di
2. Install tye via the following command: 2. Install tye via the following command:
```text ```text
dotnet tool install -g Microsoft.Tye --version "0.1.0-alpha.20209.2" --add-source https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json dotnet tool install -g Microsoft.Tye --version "0.1.0-alpha.20209.5"
``` ```
OR if you already have Tye installed and want to update: OR if you already have Tye installed and want to update:
```text ```text
dotnet tool update -g Microsoft.Tye --version "0.1.0-alpha.20209.2" --add-source https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json dotnet tool update -g Microsoft.Tye --version "0.1.0-alpha.20209.5"
``` ```
3. Verify the installation was complete by running: 3. Verify the installation was complete by running:
``` ```
tye --version tye --version
> 0.1.0-alpha.20209.2+40cecc60556a811586becfe6a793ea0e925b465c > 0.1.0-alpha.20209.5+e3fc0045bd1e5913da935241874761929f1e8465
``` ```
## Next steps ## Next steps
@ -55,4 +55,4 @@ If you are using CI builds of Tye we also recommend using CI builds of our libra
<add key="nuget" value="https://api.nuget.org/v3/index.json" /> <add key="nuget" value="https://api.nuget.org/v3/index.json" />
</packageSources> </packageSources>
</configuration> </configuration>
``` ```

31
docs/tutorials/hello-tye/00_run_locally.md

@ -65,24 +65,9 @@ This tutorial will demonstrate how to use [`tye run`](/docs/reference/commandlin
Now that we have two applications running, let's make them communicate. By default, `tye` enables service discovery by injecting environment variables with a specific naming convention. For more information on, see [service discovery](/docs/reference/service_discovery.md). Now that we have two applications running, let's make them communicate. By default, `tye` enables service discovery by injecting environment variables with a specific naming convention. For more information on, see [service discovery](/docs/reference/service_discovery.md).
1. Add a NuGet.config to add the `dotnet-core` package source. 1. Open the solution in your editor of choice.
Paste the following into `nuget.config` in the `microservice/` directory.
```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
```
2. Open the solution in your editor of choice.
3. Add a file `WeatherForecast.cs` to the `frontend` project. 2. Add a file `WeatherForecast.cs` to the `frontend` project.
```C# ```C#
using System; using System;
@ -104,7 +89,7 @@ Now that we have two applications running, let's make them communicate. By defau
This will match the backend `WeatherForecast.cs`. This will match the backend `WeatherForecast.cs`.
4. Add a file `WeatherClient.cs` to the `frontend` project with the following contents: 3. Add a file `WeatherClient.cs` to the `frontend` project with the following contents:
```C# ```C#
using System.Net.Http; using System.Net.Http;
@ -138,13 +123,13 @@ Now that we have two applications running, let's make them communicate. By defau
} }
``` ```
5. Add a reference to the `Microsoft.Tye.Extensions.Configuration` package to the frontend project 4. Add a reference to the `Microsoft.Tye.Extensions.Configuration` package to the frontend project
```txt ```txt
dotnet add frontend/frontend.csproj package Microsoft.Tye.Extensions.Configuration --version "0.1.0-*" dotnet add frontend/frontend.csproj package Microsoft.Tye.Extensions.Configuration --version "0.1.0-*"
``` ```
6. Now register this client in `Startup.cs` class in `ConfigureServices` of the `frontend` project: 5. Now register this client in `Startup.cs` class in `ConfigureServices` of the `frontend` project:
```C# ```C#
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
@ -160,7 +145,7 @@ Now that we have two applications running, let's make them communicate. By defau
This will wire up the `WeatherClient` to use the correct URL for the `backend` service. This will wire up the `WeatherClient` to use the correct URL for the `backend` service.
7. Add a `Forecasts` property to the `Index` page model under `Pages\Index.cshtml.cs` in the `frontend` project. 6. Add a `Forecasts` property to the `Index` page model under `Pages\Index.cshtml.cs` in the `frontend` project.
```C# ```C#
public WeatherForecast[] Forecasts { get; set; } public WeatherForecast[] Forecasts { get; set; }
@ -175,7 +160,7 @@ Now that we have two applications running, let's make them communicate. By defau
} }
``` ```
8. Change the `Index.cshtml` razor view to render the `Forecasts` property in the razor page: 7. Change the `Index.cshtml` razor view to render the `Forecasts` property in the razor page:
```cshtml ```cshtml
@page @page
@ -214,7 +199,7 @@ Now that we have two applications running, let's make them communicate. By defau
</table> </table>
``` ```
9. Run the project with [`tye run`](/docs/reference/commandline/tye-run.md) and the `frontend` service should be able to successfully call the `backend` service! 8. Run the project with [`tye run`](/docs/reference/commandline/tye-run.md) and the `frontend` service should be able to successfully call the `backend` service!
When you visit the `frontend` service you should see a table of weather data. This data was produced randomly in the `backend` service. The fact that you're seeing it in a web UI in the `frontend` means that the services are able to communicate. When you visit the `frontend` service you should see a table of weather data. This data was produced randomly in the `backend` service. The fact that you're seeing it in a web UI in the `frontend` means that the services are able to communicate.

Loading…
Cancel
Save