Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusted environment variables list for Middleware deployment #154

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Adjusted environment variables list for Middleware deployment
Adjusted appsettings.json for customised environment variables support
Adjusted orchestrator.yaml with new environment variables
Updated Middleware_Installation.md
  • Loading branch information
radu-popescu committed May 25, 2023
commit 52d909d3bcefdb44f4ad7e4e63881d294ff216aa
15 changes: 11 additions & 4 deletions docs/Administrator/Middleware_Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,17 @@ The last step is to prepare the deployment script for the middleware. It can be
2. Middleware__Organization – the organization to which this middleware belongs. The organization is an artificial group of Middlewares that can cooperate.
3. Middleware__InstanceName – a **unique** name of the Middleware.
4. Middleware__InstanceType – Either Edge/Cloud
5. CENTRAL_API_HOSTNAME - Address of the CentralAPI that is responsible for authenticating the Middleware instances during the startup. For more information refer to the [CentralAPI documentation](CentralApi)
6. AWS_ACCESS_KEY_ID - Aws access key ID used to access the services in AWS like Secret Manager
7. AWS_SECRET_ACCESS_KEY - Aws secret used to authenticate the access key.
8. Slice__Hostname - the hostname of the SliceManager API that allows integration of the 5G slices into the planning process of the Middleware
5. CustomLogger__LoggerName - Either Loki/Elasticsearch
6. CustomLogger__Url - The url of the logger
7. CustomLogger__User - The username for the logger
8. CustomLogger__Password - The password for the logger
9. Slice__Hostname - The hostname of the SliceManager API that allows integration of the 5G slices into the planning process of the Middleware
10. RabbitMQ__Address - The address of RabbitMQ
11. RabbitMQ__User - The user for RabbitMQ
12. RabbitMQ__Pass - The password for RabbitMQ
13. CENTRAL_API_HOSTNAME - Address of the CentralAPI that is responsible for authenticating the Middleware instances during the startup. For more information refer to the [CentralAPI documentation](CentralApi)
Artonus marked this conversation as resolved.
Show resolved Hide resolved
14. AWS_ACCESS_KEY_ID - Aws access key ID used to access the services in AWS like Secret Manager
15. AWS_SECRET_ACCESS_KEY - Aws secret used to authenticate the access key.

The most up-to-date Middleware version is `v0.4`.

Expand Down
16 changes: 16 additions & 0 deletions k8s/orchestrator/orchestrator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ spec:
value: MiddlewareBED # to be replaced with real value
- name: Middleware__InstanceType
value: Edge # to be replaced with real value
- name: CustomLogger__LoggerName
value: Loki # user can choose between Loki or Elasticsearch
- name: CustomLogger__Url
value: http://to.be.replaced.with.real.value.com # to be replaced with real value
- name: CustomLogger__User
value: myuser # to be replaced with real value
- name: CustomLogger__Password
value: mypassword # to be replaced with real value
- name: Slice__Hostname
value: http://to.be.replaced.with.real.value.com # to be replaced with real value
- name: RabbitMQ__Address
value: "amqp://" amqp_authority [ "/" vhost ] [ "?" query ] # to be replaced with real value
- name: RabbitMQ__User
value: myuser # to be replaced with real value
- name: RabbitMQ__Pass
value: mypassword # to be replaced with real value
Artonus marked this conversation as resolved.
Show resolved Hide resolved
- name: CENTRAL_API_HOSTNAME
value: central.api
- name: AWS_ACCESS_KEY_ID
Expand Down
12 changes: 10 additions & 2 deletions src/Orchestrator/Deployment/DeploymentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,23 @@ public V1Deployment CreateStartupDeployment(string name, string tag)
new("Middleware__Organization", mwConfig.Organization),
new("Middleware__InstanceName", mwConfig.InstanceName),
new("Middleware__InstanceType", mwConfig.InstanceType),
new("CustomLogger__LoggerName", _env.GetEnvVariable("CustomLogger__LoggerName")),
new("CustomLogger__Url", _env.GetEnvVariable("CustomLogger__Url")),
new("CustomLogger__User", _env.GetEnvVariable("CustomLogger__User")),
new("CustomLogger__Password", _env.GetEnvVariable("CustomLogger__Password")),
new("Slice__Hostname", _env.GetEnvVariable("Slice__Hostname")),
new("RabbitMQ__Address", _env.GetEnvVariable("RabbitMQ__Address")),
new("RabbitMQ__User", _env.GetEnvVariable("RabbitMQ__User")),
new("RabbitMQ__Pass", _env.GetEnvVariable("RabbitMQ__Pass")),
new("CENTRAL_API_HOSTNAME", _env.GetEnvVariable("CENTRAL_API_HOSTNAME")),
new("AWS_ACCESS_KEY_ID", _env.GetEnvVariable("AWS_ACCESS_KEY_ID")),
new("AWS_SECRET_ACCESS_KEY", _env.GetEnvVariable("AWS_SECRET_ACCESS_KEY"))
};
if (name.Contains("redis") || name == "gateway")
{
envList.Add(new("REDIS_HOSTNAME", _env.GetEnvVariable("REDIS_HOSTNAME")));
envList.Add(new("REDIS_PORT", _env.GetEnvVariable("REDIS_PORT")));
envList.Add(new("Redis__HostName", _env.GetEnvVariable("Redis__HostName")));
envList.Add(new("Redis__Password", _env.GetEnvVariable("Redis__Password")));
envList.Add(new("Redis__ClusterHostname", _env.GetEnvVariable("Redis__ClusterHostname")));
}

var container = new V1Container
Expand Down
28 changes: 14 additions & 14 deletions src/Orchestrator/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"Slice": {
"Hostname": ""
"Hostname": "Slice__Hostname"
Artonus marked this conversation as resolved.
Show resolved Hide resolved
},
"RabbitMQ": {
"Address": "",
"User": "",
"Pass": ""
"Address": "RabbitMQ__Address",
"User": "RabbitMQ__User",
"Pass": "RabbitMQ__Pass"
},
"Redis": {
"HostName": "",
"Password": "",
"ClusterHostname": ""
"HostName": "Redis__HostName",
"Password": "Redis__Password",
"ClusterHostname": "Redis__ClusterHostname"
},
"CustomLogger": {
"LoggerName": "",
"Url": "",
"User": "",
"Password": ""
"LoggerName": "CustomLogger__LoggerName",
"Url": "CustomLogger__Url",
"User": "CustomLogger__User",
"Password": "CustomLogger__Password"
},
"Serilog": {
"MinimumLevel": {
Expand All @@ -28,9 +28,9 @@
}
},
"Middleware": {
"Organization": "",
"InstanceName": "",
"InstanceType": ""
"Organization": "Middleware__Organization",
"InstanceName": "Middleware__InstanceName",
"InstanceType": "Middleware__InstanceType"
},
"AllowedHosts": "*",
"ApplicationName": "orchestrator-api"
Expand Down