Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Add 1.4.x OpenTracing projects for performace comparison measurements #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions AkkaDotNet.LargeNetworkTests.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "frontend", "frontend", "{39
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AkkaDotNet.FrontEnd", "src\frontend\AkkaDotNet.FrontEnd\AkkaDotNet.FrontEnd.csproj", "{696FA3DA-FE78-43B8-B24C-942662B51D2E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AkkaDotNet.FrontEnd.Tests", "src\frontend\AkkaDotNet.FrontEnd.Tests\AkkaDotNet.FrontEnd.Tests.csproj", "{3358DBCC-E7A8-4CAF-A49C-599CEA2B1A93}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{6E8AB83C-075B-4333-8DFC-17FE9EFDDBA0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AkkaDotNet.Infrastructure", "src\shared\AkkaDotNet.Infrastructure\AkkaDotNet.Infrastructure.csproj", "{98CB4416-9594-425E-990D-771170F92D36}"
Expand All @@ -27,6 +25,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "backend", "backend", "{BE2E
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AkkaDotNet.Messages", "src\shared\AkkaDotNet.Messages\AkkaDotNet.Messages.csproj", "{8F96042B-A435-4789-A92A-67B9C433E293}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTracing.FrontEnd", "src\frontend\OpenTracing.FrontEnd\OpenTracing.FrontEnd.csproj", "{3B7DBF90-D6BB-4684-A88B-4066A7003D02}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTracing.Infrastructure", "src\shared\OpenTracing.Infrastructure\OpenTracing.Infrastructure.csproj", "{FA6B1637-0CB9-405E-BD71-609CA3FE0D64}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTracing.BackEnd", "src\backend\OpenTracing.BackEnd\OpenTracing.BackEnd.csproj", "{B4F1F5AA-6164-489B-8F2C-E8886E949393}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -39,10 +43,6 @@ Global
{696FA3DA-FE78-43B8-B24C-942662B51D2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{696FA3DA-FE78-43B8-B24C-942662B51D2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{696FA3DA-FE78-43B8-B24C-942662B51D2E}.Release|Any CPU.Build.0 = Release|Any CPU
{3358DBCC-E7A8-4CAF-A49C-599CEA2B1A93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3358DBCC-E7A8-4CAF-A49C-599CEA2B1A93}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3358DBCC-E7A8-4CAF-A49C-599CEA2B1A93}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3358DBCC-E7A8-4CAF-A49C-599CEA2B1A93}.Release|Any CPU.Build.0 = Release|Any CPU
{98CB4416-9594-425E-990D-771170F92D36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{98CB4416-9594-425E-990D-771170F92D36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98CB4416-9594-425E-990D-771170F92D36}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -55,6 +55,18 @@ Global
{8F96042B-A435-4789-A92A-67B9C433E293}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F96042B-A435-4789-A92A-67B9C433E293}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F96042B-A435-4789-A92A-67B9C433E293}.Release|Any CPU.Build.0 = Release|Any CPU
{3B7DBF90-D6BB-4684-A88B-4066A7003D02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B7DBF90-D6BB-4684-A88B-4066A7003D02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B7DBF90-D6BB-4684-A88B-4066A7003D02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B7DBF90-D6BB-4684-A88B-4066A7003D02}.Release|Any CPU.Build.0 = Release|Any CPU
{FA6B1637-0CB9-405E-BD71-609CA3FE0D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA6B1637-0CB9-405E-BD71-609CA3FE0D64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA6B1637-0CB9-405E-BD71-609CA3FE0D64}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA6B1637-0CB9-405E-BD71-609CA3FE0D64}.Release|Any CPU.Build.0 = Release|Any CPU
{B4F1F5AA-6164-489B-8F2C-E8886E949393}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4F1F5AA-6164-489B-8F2C-E8886E949393}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4F1F5AA-6164-489B-8F2C-E8886E949393}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B4F1F5AA-6164-489B-8F2C-E8886E949393}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -64,9 +76,11 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{696FA3DA-FE78-43B8-B24C-942662B51D2E} = {397C6273-19B5-4DA8-8D1F-09185B0D8A02}
{3358DBCC-E7A8-4CAF-A49C-599CEA2B1A93} = {397C6273-19B5-4DA8-8D1F-09185B0D8A02}
{98CB4416-9594-425E-990D-771170F92D36} = {6E8AB83C-075B-4333-8DFC-17FE9EFDDBA0}
{044D0104-F02F-439F-A55C-5FB378D51AF5} = {BE2EB7C9-9D6A-4F8A-8226-B21428C5AC7C}
{8F96042B-A435-4789-A92A-67B9C433E293} = {6E8AB83C-075B-4333-8DFC-17FE9EFDDBA0}
{3B7DBF90-D6BB-4684-A88B-4066A7003D02} = {397C6273-19B5-4DA8-8D1F-09185B0D8A02}
{FA6B1637-0CB9-405E-BD71-609CA3FE0D64} = {6E8AB83C-075B-4333-8DFC-17FE9EFDDBA0}
{B4F1F5AA-6164-489B-8F2C-E8886E949393} = {BE2EB7C9-9D6A-4F8A-8226-B21428C5AC7C}
EndGlobalSection
EndGlobal
3 changes: 3 additions & 0 deletions k8s/local_otrace/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Local K8s Testing

This is designed for deployment on a local development machine, not a full-blown AKS cluster.
33 changes: 33 additions & 0 deletions k8s/local_otrace/deployAll.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@echo off
REM deploys all Kubernetes services to their staging environment

set namespace=akkastress
set location=%~dp0/environment

echo "Deploying K8s resources from [%location%] into namespace [%namespace%]"

echo "Creating Namespaces..."
kubectl create ns "%namespace%"

echo "Using namespace [%namespace%] going forward..."

echo "Creating configurations from YAML files in [%location%/configs]"
for %%f in (%location%/configs/*.yaml) do (
echo "Deploying %%~nxf"
kubectl apply -f "%location%/configs/%%~nxf" -n "%namespace%"
)

echo "Creating environment-specific services from YAML files in [%location%]"
for %%f in (%location%/*.yaml) do (
echo "Deploying %%~nxf"
kubectl apply -f "%location%/%%~nxf" -n "%namespace%"
)

echo "Creating all services..."
for %%f in (%~dp0/services/*.yaml) do (
echo "Deploying %%~nxf"
kubectl apply -f "%~dp0/services/%%~nxf" -n "%namespace%"
)

echo "All services started... Printing K8s output.."
kubectl get all -n "%namespace%"
4 changes: 4 additions & 0 deletions k8s/local_otrace/destroyAll.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
REM destroys all K8s services in "phobos-web" namespace

kubectl delete ns akkastress
23 changes: 23 additions & 0 deletions k8s/local_otrace/environment/configs/configs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# staging settings
kind: ConfigMap
apiVersion: v1
metadata:
name: stress-configs
data:
# Configuration values can be set as key-value properties
ASPNETCORE_ENVIRONMENT: Production

# standard Akka.NET ports for all services
StressOptions__AkkaClusterOptions__ManagementPort: "9221"
StressOptions__AkkaClusterOptions__ManagementPort: "9228"
StressOptions__AkkaClusterOptions__UseKubernetesLease: "true"

# configure Akka.Management K8s service discovery
StressOptions__AkkaClusterOptions__UseKubernetesDiscovery: "true"
StressOptions__AkkaClusterOptions__KubernetesDiscoveryOptions__PodNamespace: "akkastress"
StressOptions__AkkaClusterOptions__KubernetesDiscoveryOptions__PodLabelSelector: "akkacluster=stress"

# configure Serilog
StressOptions__SerilogOptions__EnableSeq: "true"
StressOptions__SerilogOptions__SeqHost: "seq"
StressOptions__SerilogOptions__SeqPort: "8988"
54 changes: 54 additions & 0 deletions k8s/local_otrace/environment/configs/k8s-lease-crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: leases.akka.io
spec:
group: akka.io
versions:
- name: v1
storage: true
served: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
owner:
type: string
version:
type: string
time:
type: integer
scope: Namespaced
names:
# kind is normally the CamelCased singular type. Your resource manifests use this.
kind: Lease
listKind: LeaseList
# singular name to be used as an alias on the CLI and for display
singular: lease
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
plural: leases
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: lease-access
rules:
- apiGroups: ["akka.io"]
resources: ["leases"]
verbs: ["get", "create", "update", "list"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: lease-access
subjects:
- kind: User
name: system:serviceaccount:akkastress:default
roleRef:
kind: Role
name: lease-access
apiGroup: rbac.authorization.k8s.io
29 changes: 29 additions & 0 deletions k8s/local_otrace/environment/configs/rbac-reader.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# Create a role, `pod-reader`, that can list pods and
# bind the default service account in the namespace
# that the binding is deployed to to that role.
#

kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pod-reader
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["pods"]
verbs: ["get", "watch", "list"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: read-pods
subjects:
# Uses the default service account.
# Consider creating a dedicated service account to run your
# Akka Cluster services and binding the role to that one.
- kind: ServiceAccount
name: default
roleRef:
kind: Role
name: pod-reader
apiGroup: rbac.authorization.k8s.io
Loading
Loading