Beispiel #1
0
        public async Task Run()
        {
            //var devopInfraToken = await helper.Ask(DevopInfraToken);

            var apikey = await listAsk.InfraApiKey.Ask();

            var webServerRootPassword = await listAsk.WebServerRootPassword.Ask();

            var webServerUser = await listAsk.WebServerAdminUser.Ask();

            var webServerPassword = await listAsk.WebServerAdminPassword.Ask();



            infrastructure.CreateVm(apikey, "webServer", webServerRootPassword, webServerUser, webServerPassword);
            var uri             = infrastructure.GetVmSshUri(apikey, "webServer");
            var webServerSshUri = uri.ToString();


            //IAuthenticationInfo tokenAuthenticationInfo = new TokenAuthenticationInfo(devopInfraToken);
            IAuthenticationInfo auth = new UserPasswordAuthenticationInfo(
                await listAsk.LocalVaultDevopUser.Ask(),
                await listAsk.LocalVaultDevopPassword.Ask());


            await listResources.InfrastructureApiKey.Write(auth, apikey);

            await listResources.WebServerRootPassword.Write(auth, webServerRootPassword);

            await listResources.WebServerUser.Write(auth, webServerUser);

            await listResources.WebServerPassword.Write(auth, webServerPassword);

            await listResources.WebServerSshUri.Write(auth, webServerSshUri);
        }
Beispiel #2
0
        private async Task <IAuthenticationInfo> GetAuthentication()
        {
            IAuthenticationInfo auth = new UserPasswordAuthenticationInfo(
                await pstep.listAsk.LocalVaultDevopUser.Ask(),
                await pstep.listAsk.LocalVaultDevopPassword.Ask());

            return(auth);
        }
Beispiel #3
0
        public async Task Check()
        {
            IAuthenticationInfo auth = new UserPasswordAuthenticationInfo(
                await listAsk.LocalVaultDevopUser.Ask(),
                await listAsk.LocalVaultDevopPassword.Ask());

            StepAssert.IsTrue(null != await listResources.CAKey.Read(auth));
            StepAssert.IsTrue(null != await listResources.CAPem.Read(auth));
        }
Beispiel #4
0
        public async Task <SshConnection> GetPiloteSshConnection()
        {
            //IAuthenticationInfo auth = new TokenAuthenticationInfo(await listAsk.LocalVaultToken.Ask());

            IAuthenticationInfo auth = new UserPasswordAuthenticationInfo(
                await listAsk.LocalVaultDevopUser.Ask(),
                await listAsk.LocalVaultDevopPassword.Ask());

            return(await listResources.PiloteSshConnection.Read(auth));
        }
Beispiel #5
0
        public async Task Run()
        {
            installer.Install("OpenSsl");

            var caDomain = await listAsk.CADomain.Ask();

            var caKey = this.openSsl.generateCAKey(caDomain);
            var caPem = this.openSsl.generateCAPem(caKey, caDomain);

            IAuthenticationInfo auth = new UserPasswordAuthenticationInfo(
                await listAsk.LocalVaultDevopUser.Ask(),
                await listAsk.LocalVaultDevopPassword.Ask());

            await listResources.CAKey.Write(auth, caDomain);

            await listResources.CAPem.Write(auth, caPem);
        }