Пример #1
0
        public static ActionResult InstallRavenDb(Session session)
        {
            session.Log("Installing RavenDB if necessary.");

            try
            {
                CaptureOut(() =>
                {
                    var ravenDbSetup = new RavenDBSetup();
                    if (ravenDbSetup.Install(WindowsIdentity.GetCurrent(), allowInstall: true))
                    {
                        session.Log("RavenDB installed and configured.");
                    }
                    else
                    {
                        session.Log("RavenDB could not be installed.");
                    }
                }, session);

                return(ActionResult.Success);
            }
            catch (Exception)
            {
                return(ActionResult.Failure);
            }
        }
Пример #2
0
 protected override void ProcessRecord()
 {
     if (ShouldProcess(Environment.MachineName))
     {
         RavenDBSetup.Install(Port, Path);
     }
 }
Пример #3
0
        public void EnsureGetRavenResourcesIsNotEmpty()
        {
            var combine = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());

            try
            {
                Directory.CreateDirectory(combine);
                RavenDBSetup.ExportRavenResources(combine);
                Assert.IsNotEmpty(Directory.GetFiles(combine));
            }
            finally
            {
                Directory.Delete(combine, true);
            }
        }
Пример #4
0
        public static ActionResult InstallRavenDb(Session session)
        {
            session.Log("Installing RavenDB if necessary.");

            try
            {
                CaptureOut(() =>
                {
                    RavenDBSetup.Install();
                    session.Log("RavenDB installed and configured.");
                }, session);

                return(ActionResult.Success);
            }
            catch (Exception)
            {
                return(ActionResult.Failure);
            }
        }
Пример #5
0
 public void Install()
 {
     RavenDBSetup.Install();
 }
Пример #6
0
        public static ActionResult InstallRavenDb(Session session)
        {
            session.Log("Installing RavenDB if necessary.");

            try
            {
                CaptureOut(() =>
                    {
                        var ravenDbSetup = new RavenDBSetup();
                        if (ravenDbSetup.Install(WindowsIdentity.GetCurrent(), allowInstall: true))
                        {
                            session.Log("RavenDB installed and configured.");
                        }
                        else
                        {
                            session.Log("RavenDB could not be installed.");
                        }
                    }, session);

                return ActionResult.Success;
            }
            catch (Exception)
            {
                return ActionResult.Failure;
            }
        }
Пример #7
0
        protected override void ProcessRecord()
        {
            var isGood = RavenDBSetup.Check(Port);

            WriteObject(isGood);
        }