public async Task <bool> DeployImageToAzureHost(string resourceName, Guid credentialsId, Guid dockerImageId)
        {
            Guard.Against.NullOrEmpty(resourceName, nameof(resourceName));
            Guard.Against.GuidNullOrDefault(credentialsId, nameof(credentialsId));
            Guard.Against.GuidNullOrDefault(dockerImageId, nameof(dockerImageId));

            var ipAddress = await GetIpAddressOfNewDeployment(resourceName, credentialsId);

            return(await _dockerRemoteService.DeployImageToHost(ipAddress, 2376, dockerImageId));
        }
Beispiel #2
0
        public async Task <bool> DeployImageToVM(string stackName, Guid credentialsId, Guid dockerImageId)
        {
            Guard.Against.NullOrEmpty(stackName, nameof(stackName));
            Guard.Against.GuidNullOrDefault(credentialsId, nameof(credentialsId));
            Guard.Against.GuidNullOrDefault(dockerImageId, nameof(dockerImageId));

            var ipAddress = await GetIpForDeployedStack(stackName, credentialsId);

            return(await _dockerRemoteService.DeployImageToHost(ipAddress, 2376, dockerImageId));
        }
Beispiel #3
0
        public async Task <IActionResult> OnPostAsync()
        {
            await CreateSelectList();

            if (!ModelState.IsValid)
            {
                return(Page());
            }

            var imageDeployed = await _dockerRemoteService.DeployImageToHost(DockerHost, PortNumber, DockerImage, UserName, Password);

            return(Page());
        }