Skip to content

Instantly share code, notes, and snippets.

Derek Comartin dcomartin

Block or report user

Report or block dcomartin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Startup.cs
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Orleans.AspNetCore.Demo
{
public class Startup
{
View OrleansHealthCheck.cs
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Orleans.AspNetCore.Demo.Grains;
namespace Orleans.AspNetCore.Demo
{
public class OrleansHealthCheck : IHealthCheck
View HealthCheckGrain.cs
using System.Threading.Tasks;
using Orleans.Concurrency;
namespace Orleans.AspNetCore.Demo.Grains
{
public interface IHealthCheckGrain : IGrainWithGuidKey
{
Task<bool> IsHealthy();
}
View HomeController.cs
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Orleans.AspNetCore.Demo.Grains;
namespace Orleans.AspNetCore.Demo.Controllers
{
public class HomeController : Controller
{
private readonly IClusterClient _clusterClient;
View Program.cs
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Orleans.Hosting;
namespace Orleans.AspNetCore.Demo
{
public class Program
{
public static void Main(string[] args)
View mono.sh
sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel
View dotnetsdk.sh
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-3.0
View init.sh
sudo chmod 755 /etc/init.d/teamcity
sudo update-rc.d teamcity defaults
View teamcity.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: TeamCity Build Agent
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start build agent daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
View step1.sh
sudo apt-get update
sudo apt-get -y install openjdk-8-jre-headless libssl-dev git-core pkg-config build-essential curl gcc g++ checkinstall unzip
wget http://{TeamCityHostName}:{Port}/update/buildAgent.zip
unzip buildAgent.zip -d buildAgent
chmod +x buildAgent/bin/agent.sh
cp buildAgent/conf/buildAgent.dist.properties buildAgent/conf/buildAgent.properties
You can’t perform that action at this time.