Giter Site home page Giter Site logo

vmware / script-runtime-service-for-vsphere Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 9.0 4.83 MB

The Repository contains Script Runtime Service for vSphere. A service for managing server-side PowerCLI instances to run commands and scripts against VCenter servers.

License: Other

Shell 0.59% PowerShell 1.40% C# 46.05% Dockerfile 0.03% Batchfile 0.01% Smalltalk 47.60% Java 4.31% Scala 0.01%

script-runtime-service-for-vsphere's People

Contributors

dmilov avatar kamennikolov avatar lyuboasenov avatar strefethen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

script-runtime-service-for-vsphere's Issues

Helm install registration fails

After deploying the SRS Appliance, I attempted the helm register command but it failed without any details.

helm install ~/srs --generate-name --set vc.address='192.168.30.3' --set vc.user='[email protected]' --set vc.password='VMware1!' --set srs.service.hostname='srs.primp-industries.local' --set vc.tls_thumbprint='fcf4c175f40922d98c22105498fa8667fd3b9ac7'
Error: failed post-install: pod srs-1616623839-register failed

Look at the SRS register container logs, I see the following:

kubectl -n script-runtime-service logs srs-1616623839-register

....
dbug: VMware.ScriptRuntimeService.Setup.SetupFlows.RegisterWithVCSetupFlow[0]
      Resolved SSO SDK Endpoint: https://vcsa.primp-industries.local/sso-adminserver/sdk/vsphere.local
dbug: VMware.ScriptRuntimeService.Setup.SetupFlows.RegisterWithVCSetupFlow[0]
      Resolved Sts Endpoint: https://vcsa.primp-industries.local/sts/STSService/vsphere.local
info: VMware.ScriptRuntimeService.Setup.SsoSolutionUserRegistration[0]
      Performing operation: Solution user registration
fail: VMware.ScriptRuntimeService.Setup.SsoSolutionUserRegistration[0]
      System.AggregateException: One or more errors occurred. (There was no endpoint listening at https://vcsa.primp-industries.local/sts/STSService/vsphere.local that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.)
       ---> System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://vcsa.primp-industries.local/sts/STSService/vsphere.local that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
       ---> System.Net.Http.HttpRequestException: Name or service not known
       ---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name or service not known
         at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
         --- End of inner exception stack trace ---
         at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
         at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
         at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
         at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
         at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
         at System.Net.Http.AuthenticationHelper.SendWithAuthAsync(HttpRequestMessage request, Uri authUri, ICredentials credentials, Boolean preAuthenticate, Boolean isProxyAuth, Boolean doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken)
         at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
         at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
         at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
         at System.ServiceModel.Channels.HttpChannelFactory`1.HttpClientRequestChannel.HttpClientChannelAsyncRequest.SendRequestAsync(Message message, TimeoutHelper timeoutHelper)
         --- End of inner exception stack trace ---
         at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
         at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
         at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
         at System.ServiceModel.Channels.ServiceChannelProxy.TaskCreator.<>c__DisplayClass1_0.<CreateGenericTask>b__0(IAsyncResult asyncResult)
         --- End of inner exception stack trace ---
         at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
         at System.Threading.Tasks.Task`1.get_Result()
         at VMware.ScriptRuntimeService.Sts.STSClient.<>c__DisplayClass8_0.<IssueBearerTokenByUserCredential>b__0() in /build/mts/release/bora-17270912/cayman_script-runtime-service-for-vsphere/script-runtime-service-for-vsphere/src/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Sts/STSClient.cs:line 160
         at VMware.ScriptRuntimeService.WsTrust.SecurityContext.WsSecurityContext.InvokeOperation[T](Func`1 operation) in /build/mts/release/bora-17270912/cayman_script-runtime-service-for-vsphere/script-runtime-service-for-vsphere/src/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.WsTrust/SecurityContext/WsSecurityContext.cs:line 64
         at VMware.ScriptRuntimeService.Sts.STSClient.IssueBearerTokenByUserCredential(String username, SecureString password) in /build/mts/release/bora-17270912/cayman_script-runtime-service-for-vsphere/script-runtime-service-for-vsphere/src/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Sts/STSClient.cs:line 159
         at VMware.ScriptRuntimeService.SsoAdmin.SsoAdminClient.CreateAuthorizedInvocationContext(String authorizationUsername, SecureString authorizationPassword) in /build/mts/release/bora-17270912/cayman_script-runtime-service-for-vsphere/script-runtime-service-for-vsphere/src/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.SsoAdmin/SsoAdminClient.cs:line 113
         at VMware.ScriptRuntimeService.SsoAdmin.SsoAdminClient.CreateLocalSolutionUser(String authorizationUsername, SecureString authorizationPassword, String userName, X509Certificate2 certificate, String description) in /build/mts/release/bora-17270912/cayman_script-runtime-service-for-vsphere/script-runtime-service-for-vsphere/src/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.SsoAdmin/SsoAdminClient.cs:line 149
         at VMware.ScriptRuntimeService.Setup.SsoSolutionUserRegistration.CreateSolutionUser(String user, SecureString password) in /build/mts/release/bora-17270912/cayman_script-runtime-service-for-vsphere/script-runtime-service-for-vsphere/src/src/Admin/VMware.ScriptRuntimeService.Setup/SsoSolutionUserRegistration.cs:line 38

I'm able to manually retrieve the file from SRS, so at least that looks good ...

wget --no-check-certificate https://vcsa.primp-industries.local/sts/STSService/vsphere.local
--2021-03-25 01:02:53--  https://vcsa.primp-industries.local/sts/STSService/vsphere.local
Resolving vcsa.primp-industries.local... 192.168.30.3
Connecting to vcsa.primp-industries.local|192.168.30.3|:443... connected.
WARNING: cannot verify vcsa.primp-industries.local's certificate, issued by ‘OU=VMware Engineering,O=vcsa.primp-industries.local,ST=California,C=US,DC=local,DC=vsphere,CN=CA’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 826 [text/html]
Saving to: ‘vsphere.local’

vsphere.local                                            100%[================================================================================================================================>]     826  --.-KB/s    in 0s

Issues launching Power Actions from vCenter web UI

Describe the bug

We have been dealing with some issues launching VMware Power Actions from vCenter web client. We got the latest version installed and configured. Not sure what exactly is the problem here. The error we see from vCenter is provided below. Unfortunately, we are unable to open a ticket with VMware support either.

Error retrieving the console.
A general error occurred. Please check the logs for more information.

Reproduction steps

  1. Deploy VMware power actions appliance using the .OVA file
  2. Configure a static IP, DNS etc.
  3. Launch the Power Actions by going into vSphere - Developer Center
    ...

Expected behavior

We expected the Power Actions to launch the PowerCLI client from the vCenter itself. Instead, we are seeing the below error.

Error retrieving the console.
A general error occurred. Please check the logs for more information.

Additional context

No response

The vccleanup.ps1 script fails to find 'Debug' modules.

When running the vccleanup.ps1 script, on Ubuntu 18.04.5 with dotnet 3.1.403, it produces errors about 'Debug' modules not found.

Build '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Sts/VMware.ScriptRuntimeService.Sts.csproj'
STS Library: '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Sts/bin/Debug/netcoreapp3.0/VMware.ScriptRuntimeService.Sts.dll'
Build '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Ls/VMware.ScriptRuntimeService.Ls.csproj'
LS Library: '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Ls/bin/Debug/netcoreapp3.0/VMware.ScriptRuntimeService.Ls.dll'
Build '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.SsoAdmin/VMware.ScriptRuntimeService.SsoAdmin.csproj'
Sso Admin Library: '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.SsoAdmin/bin/Debug/netcoreapp3.0/VMware.ScriptRuntimeService.SsoAdmin.dll'
Import-Module: /home/luc/script-runtime-service-for-vsphere/appliance/vccleanup.ps1:70
Line |
  70 |  Import-Module $STSLibraryPath
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The specified module '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Sts/bin/Debug/netcoreapp3.0/VMware.ScriptRuntimeService.Sts.dll' was not loaded because no valid module file was found in any module
     | directory.

Import-Module: /home/luc/script-runtime-service-for-vsphere/appliance/vccleanup.ps1:71
Line |
  71 |  Import-Module $LSLibraryPath
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The specified module '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Ls/bin/Debug/netcoreapp3.0/VMware.ScriptRuntimeService.Ls.dll' was not loaded because no valid module file was found in any module
     | directory.

Import-Module: /home/luc/script-runtime-service-for-vsphere/appliance/vccleanup.ps1:72
Line |
  72 |  Import-Module $SsoAdminLibraryPath
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The specified module '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.SsoAdmin/bin/Debug/netcoreapp3.0/VMware.ScriptRuntimeService.SsoAdmin.dll' was not loaded because no valid module file was found in any
     | module directory.

New-Object: /home/luc/script-runtime-service-for-vsphere/appliance/vccleanup.ps1:87
Line |
  87 |  $lsClient = New-Object `
     |              ~~~~~~~~~~~~
     | Cannot find type [VMware.ScriptRuntimeService.Ls.LookupServiceClient]: verify that the assembly containing this type is loaded.

InvalidOperation: /home/luc/script-runtime-service-for-vsphere/appliance/vccleanup.ps1:92
Line |
  92 |  $services = $lsClient.ListRegisteredServices()
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | You cannot call a method on a null-valued expression.

When I change line 47 in vccleanup.ps1 to

   $configuration = 'Release'

the script runs without error.

Build '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Sts/VMware.ScriptRuntimeService.Sts.csproj'
STS Library: '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Sts/bin/Release/netcoreapp3.0/VMware.ScriptRuntimeService.Sts.dll'
Build '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Ls/VMware.ScriptRuntimeService.Ls.csproj'
LS Library: '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.Ls/bin/Release/netcoreapp3.0/VMware.ScriptRuntimeService.Ls.dll'
Build '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.SsoAdmin/VMware.ScriptRuntimeService.SsoAdmin.csproj'
Sso Admin Library: '/home/luc/script-runtime-service-for-vsphere/src/vSphereIntegrationLibraries/VMware.ScriptRuntimeService.SsoAdmin/bin/Release/netcoreapp3.0/VMware.ScriptRuntimeService.SsoAdmin.dll'

vCenter client plug-in install hangs

Describe the bug

Hi,
I'm running into an issue while deploying the appliance that the plug-in is not getting installed on the vCenter, the task hangs at 0%. I see in the appliance log (power-actions-setup.log) that it is waiting for it to be installed so it seems to be a vCenter issue. I'm logged in with the default administrator account. vCenter version: 7.0 U3o (22357613). I have doubt that it matters but the solution is on the same network, no firewall between the appliance and the vCenter. The vCenter has self-signed certificate but I used the checkbox to disable certificate check upon deployment.
Any pointers where to check why it doesn't want to be installed on the VC? Or is there any other dependency which I'm missing before I could deploy it?
Thank you in advance!

Reproduction steps

  1. Downloaded the latest OVA (VMware-Power-Actions-1.0.3.0-22361595_OVF10.ova)
  2. Deployment through the UI with the proper parameters (VM name, target cluster and datastore, port group, credentials (using the given example P@ssword123! to ensure service startup), IP and DNS).

Expected behavior

Plug-in installed and available on the vCenter UI.

Additional context

I have noticed one relevant warning on the console during deployment:
image
"vCenter address <vCenter_IP> does not match its certificate common name <vCenter_FQDN>. This may prevent plug-in from registering into the vCenter"
This is due to the self-signed certificate? I don't know others, but in many cases, I use VC like this and PowerActions would be a great help if it would work natively without any modification to the VC certificate - if that's the issue at all.

[Feature Request] Create a PS module for using SRS

To facilitate the use of SRS for a casual PowerCLI/PowerShell user, it might be handy to have a PowerShell module that encapsulates the REST API calls.
This avoids that the user has to do the tedious Invoke-RestMethod calls all the time.

PS: if you are looking for volunteers to start such a module, you can count me in.

vccleanup.ps1 script fails when more than 1 SRS service is registered

The lines 95-111 of the vccleanup.ps1 only take into account that 1 SRS service can be registered.
When more than 1 registration exists the registrations are not removed.

Changing the lines 95-111 to something like the following, using a Foreach-Object loop, would fix that problem I think.

if ($srsService -ne $null) {
    $srsService | ForEach-Object -Process {
        Write-Host "Remove SRS Service registration from VC"
        $lsClient.DeleteService(
            $VcUser,
            (ConvertTo-SecureString -String $VcPassword -Force -AsPlainText),
            $_.serviceId)

        $ssoAdminClient = New-Object `
            'VMware.ScriptRuntimeService.SsoAdmin.SsoAdminClient' `
            -ArgumentList $lsClient.GetSsoAdminEndpointUri(), $lsClient.GetStsEndpointUri(), (New-Object 'CertificateValidators.AcceptAllX509CertificateValidator')

        $ssoAdminClient.
        DeleteLocalPrincipal(
            $VcUser,
            (ConvertTo-SecureString -String $VcPassword -Force -AsPlainText),
            $_.ownerId );
    }
}

Build fails for ESXi 6.7+ (VNC)

Seems the build relies on VNC being available on the ESXi node.
And since ESXi 6.7, the VNC service was removed.

Using vnc_over_websocket fixes that, but creates a dependency on the packer version.

PowerCLI 12.1 Set-Datacenter cmdlet fails when it is called in SRS runspace

When I run a multi-line script like this

New-Datacenter -Name TestDC -Location (Get-Folder -Name datacenters)
Get-Datacenter -Name TestDC | Set-Datacenter -Name TestDC-New -Confirm:$false
Get-Datacenter -Name TestDC-New | Remove-Datacenter -Confirm:$false

the output from the New-Datacenter cmdlet is returned.
The output of the Set-Datacenter cmdlet is apparently not returned.
Via the Web Client I see that all code is executed though.

This also explains why the 'Runs CRUD10Datacenters PowerCLI Script' Pester test fails.
The 2nd part, the output of the renames of the datacenters doesn't show in the script output.

[Feature Request] pull script from configmap

It would be great if srs supported creating a script in the system which could be saved in a config map. This scrip could then be referenced in the run api which would mount the config map to the runtime pod and execute the script. This would greatly inhance the capabilities beyond ad-hoc commands and short scripts.

[Q] Can a user overwrite MaxRunspaceActiveTimeMinutes?

It looks as if the current maximum time, specified in MaxRunspaceActiveTimeMinutes, a runspace can be active is 60 minutes.

Can this be overwritten for an existing SRS instance?
Or does it require a new SRS OVA build?

The reason for asking, a monitoring/collecting script that runs longer than 60 mins.

Debugging instructions?

While the creation of the OVA seems to succeed, once a VM is deployed, it keeps getting a 404 for nginx.
Are there pointers on how to find the issue?

[Q] Photon version

The current implementation uses the original Photon v3 GA version, which is nearing its 2nd year anniversary.

I understand that in this stage of the SRS development, the project concentrates on a specific Photon version.

The question, will it be possible to select the Photon version at a later stage of the project?
Or is Photon v3 GA the standard version for all appliances?

Intermittent status code 1040 on /api/script-executions/{id} GET calls

After starting a script execution with /api/script-executions PUT, I use /api/script-executions/{id} GET to verify the executon status of the started script.
Intermittently, I get a status code 1040 returned "Script with id {id} not found".

A subsequent identical call works without an issue.

The log in /app/service/logs doesn't show anything going wrong as far as I can tell.

2020-10-30 14:41:59.7452|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/1.1 GET http://srs1.local.lab/api/script-executions/edbaeec3-a18c-4352-b8f6-8f66e697d8cb application/json  
2020-10-30 14:41:59.7452|8|DEBUG|VMware.ScriptRuntimeService.APIGateway.Authentication.SessionAuthenticationHandler|AuthenticationScheme: srs-session-atuhentication was successfully authenticated. 
2020-10-30 14:41:59.7452|8|DEBUG|VMware.ScriptRuntimeService.APIGateway.Authentication.SessionAuthenticationHandler|AuthenticationScheme: srs-session-atuhentication was successfully authenticated. 
2020-10-30 14:41:59.7452|1|INFO|Microsoft.AspNetCore.Authorization.DefaultAuthorizationService|Authorization was successful. 
2020-10-30 14:41:59.7452|0|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executing endpoint 'VMware.ScriptRuntimeService.APIGateway.Controllers.ScriptExecutionsController.Get (VMware.ScriptRuntimeService.APIGateway)' 
2020-10-30 14:41:59.7452|3|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Route matched with {action = "Get", controller = "ScriptExecutions"}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult`1[VMware.ScriptRuntimeService.APIGateway.DataTypes.ScriptExecution] Get(System.String) on controller VMware.ScriptRuntimeService.APIGateway.Controllers.ScriptExecutionsController (VMware.ScriptRuntimeService.APIGateway). 
2020-10-30 14:41:59.7452|1|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor|Executing ObjectResult, writing value of type 'VMware.ScriptRuntimeService.APIGateway.DataTypes.ScriptExecution'. 
2020-10-30 14:41:59.7452|2|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed action VMware.ScriptRuntimeService.APIGateway.Controllers.ScriptExecutionsController.Get (VMware.ScriptRuntimeService.APIGateway) in 0.1506ms 
2020-10-30 14:41:59.7452|1|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executed endpoint 'VMware.ScriptRuntimeService.APIGateway.Controllers.ScriptExecutionsController.Get (VMware.ScriptRuntimeService.APIGateway)' 
2020-10-30 14:41:59.7452|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished in 0.6586000000000001ms 200 application/json; charset=utf-8 

The Invoke-WebRequest call shows the error

Invoke-WebRequest : {"code":1040,"error_message":"Script with id 'edbaeec3-a18c-4352-b8f6-8f66e697d8cb' not found"}

Suspected typo in Pester test

In the 'Runs CRUD10Datacenters PowerCLI Script' Pester test in PowerCLIScripts.Tests.ps1 there seems to be a typo in the 1st It statement (line 388).
The condition says it expects 20 entries, while the foreach loop in CRUD10Datacenters.ps1 only goes to 10.

Build fails with Photon OS 3.0 Revision 3

During the build the SRS_Application fails to get the photon-kickstart.json file.
With Photon OS 3.0 Revision 2 it works without an issue.

It looks as if with Photon OS 3.0 Revision 3 the retries to get the photon-kickstart.json are not done.
After one try, the Photon installer stops.

Snag_35d62f9f

With Photon OS 3.0 Revision 2 the installer tries 5 times to get the photon-kickstart.json file.

This seems to be the same issue as reported in vmware/photon#1065

Modify for use with VMware Cloud on AWS

I realize we could never build Photon in VMC, but it would be great if we could use this with a VMware Cloud on AWS SDDC. My initial use case is to replace some of the SSH-based automation we have running in our SET team customer demo lab, we currently have Slack connected to a mule host running in VMC, Slack connects with SSH and invokes PowerShell commands. I initially hoped we could have this project run the PowerShell and invoke it with a true API, eliminating the SSH component. But registering with vCenter requires full vCenter admin rights, and this is not possible in VMC.

[Feature Request] Functionality without vCenter server

Just a quick question. You write in the docs that the SRS "automatically connects to the target vCenter Servers", but does it require a vCenter server for deployment or operation? Does it operate just with ESXi hosts? For example, the vCenter may be crashed or just not fully booted after a complete reboot of my cluster.

[Feature Request] SRS only contains the PowerCLI modules

In the current build the SRS only seems to contain the PowerCLI modules.
Can the build have an option to also include the standard PS modules, that come with PS, in the container?

This would probably also allow users to install additional modules in SRS.
Currently that option is not there.

Build fails when endpoint is defined on a VDS portgroup

When the builder_host_portgroup in file photon-builder.json specifies a VDS portgroup, the deployment of the SRS_Appliance endpoint hangs on "Waiting for SSH".

I suspect this might be due to the fact that Packer build uses vmware-iso.
This builder, in contrast with the vsphere-iso builder, uses an esxcli command (esxcli --formatter csv network vm port list -w 99999) to locate the SRS_Appliance.
This will not work for a VDS connected VM.

I think it might be useful to mention this in the Build and Run instructions.

Perhaps it would be useful to switch to the vsphere-iso builder (vSPhere 6.5 or higher required), which use the vCenter API to locate the VM.
This would probably also avoid the VNC issues with the vmware-iso builder.

SRS and $env:PSModulePath

The $env:PSModulePath variable inside SRS seems to have some irregularities.

The content of the variable is currently

/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/app/service/Modules::/app/PowerCLIModules
  • There is the double separator ([System.IO.Path]::PathSeparator which is colon on Linux) before /app/PowerCLIModules Is there a specific reason for that?
  • The first three paths seem to point to non-existing modules directories

[Feature Request] SRS uses PSv6.2.4, while a PSv7 package is available for Photon

Although the Photon TDNF package is not the latest version, they do have a package for PSv7.0.0.

Since PSv7.0.0 introduced new parameters and features for Invoke-WebRequest and Invoke-RestMethod, and seen VMware is offering newer features only through REST, can we have the latest PS version in SRS?

Btw, not really an SRS issue, but it would be handy if the creators of the TDNF package for PowerShell played closer on the ball.
Currently PS is at PSv7.0.3

Error When Trying To Register SRS With Helm

Describe the bug

I am attempting deploy a brand new SRS VM and I'm getting an error when using Helm to register. I've followed the installation steps precisely but this is the error I get.

Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "https://127.0.0.1:38729/version": read tcp 127.0.0.1:39574->127.0.0.1:38729: read: connection reset by peer

Any help would be appreciated.

Thank you.

Reproduction steps

  1. Upload OVA
  2. Login as root then change password
  3. Run helm command (placeholders are generic examples; I used my unique values when running): helm install ~/srs --generate-name --set vc.address='ip_address' --set vc.user='[email protected]' --set vc.password='user_password' --set srs.service.hostname='srs-host-vm.domain.com' --set vc.tls_thumbprint='XYZ'
  4. Error is returned: Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "https://127.0.0.1:38729/version": read tcp 127.0.0.1:39574->127.0.0.1:38729: read: connection reset by peer
    ...

Expected behavior

Helm should register SRS as detailed in the instructions.

Additional context

No response

[Enhancement Request] Create upgrade SRS automation for local SRS builds

Make build and and upgrade existing SRS deployment from source code. Currently it is not possible to get latest sources and upgrade existing SRS OVA. If one wants to get latest source code s/he has to build and redeploy the OVA.

Since VM from OVA build is just the host of the SRS K8s service, there should be automation available to just build the service from code and upgrade it on existing deployed host VM.

error Kubernetes cluster unreachable installing on new ovf

Describe the bug

hi,
i deployed a new vm from the ovf.
i have configured network, dns record and hostname, and updated the hosts file with the new name.
when running the command
helm install ~/srs --generate-name --set vc.address='10.xx.xx.20' --set vc.user='[email protected]' --set vc.password='xxxx' --set srs.service.hostname='vko-srs1.xxx' --set vc.tls_thumbprint='c98837971d0yyyyyya9e2f9xxxxxxxxxe060361d3a'
i get the following error:
Error: Kubernetes cluster unreachable: an error on the server ("") has prevented the request from succeeding

i tried using ip as the srs server name, i hadded the fqdn to the hosts file but nothing seems to help.
i have dns resolving from both vc to srs and vice versa.

what am i missing?

Reproduction steps

1. deploy ovf
2. set ip/dns/hostname
3. update hosts file
4. run the command from the wiki
...

Expected behavior

srs installed correctly

Additional context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.