Giter Site home page Giter Site logo

rguryanov / dmp.dbenginelaucher Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 72 KB

Dmp.DbEngineLaucher - launcher for postgresql server (support installation from remote server and from local directory containing installation package).

License: Other

C# 100.00%
postgres postgres-launcher postgres-server-launcher

dmp.dbenginelaucher's Introduction

Dmp.DbEngineLaucher - launcher for postgresql server (support installation from remote official source and from local directory containing installation packages - use AllZipSourcesFromDirEngineInstalationResolver instead RemoteHttpSourcesEngineInstalationResolver, or implement your own IEngineInstalationResolver).

Examples of using:

// install postgre binaries to installPgSqlPath
// and initialize db cluster with database dir - pgDataPath (analog --pgdata)
// RemoteHttpSourcesEngineInstalationResolver -
// download binaries sources from official site (version can be specified as parameter)
// start server with default parameters: 
// host - "localhost"
// port - 5432,
// database superuser - postgres
// database password - postgres
// database encoding - UTF8
IDatabaseService dataBaseEngineService = new PostgreSqlDataBaseEngineLauncher(
new InstallationSettings(installPgSqlPath: "C:\\pgserverbinaries", pgDataPath: "C:\\pgdata"),
new RemoteHttpSourcesEngineInstalationResolver());
dataBaseEngineService.StartAsync().Wait();
dataBaseEngineService.StopAsync().Wait();

local sources

// install postgre binaries to installPgSqlPath
// and initialize db cluster with database dir - pgDataPath (analog --pgdata)
// new AllZipSourcesFromDirEngineInstalationResolver("C:\\pgserverpackagesbinaries", "9.5.5-1") - 
// - use sources from dir C:\\pgserverpackagesbinaries
// directory have to contain files (one or more)
//postgresql-9.5.5-1-linux-binaries.tar.gz - for x86 linux
//postgresql-9.5.5-1-linux-x64-binaries.tar.gz - for x64 linux
//postgresql-9.5.5-1-osx-binaries.zip - for x64 osx
//postgresql-9.5.5-1-windows-binaries.zip - for x86 windows
//postgresql-9.5.5-1-windows-x64-binaries.zip - for x64 windows
IDatabaseService dataBaseEngineService = new PostgreSqlDataBaseEngineLauncher(
new InstallationSettings(installPgSqlPath: "C:\\pgserverbinaries", pgDataPath: "C:\\pgdata"),
new AllZipSourcesFromDirEngineInstalationResolver("C:\\pgserverpackagesbinaries", "9.5.5-1"));

complex example

IDatabaseService dataBaseEngineService = new PostgreSqlDataBaseEngineLauncher(
	new SimpleSettingsProvider(
		new PostgreEngineStartupSettings(new ServerArrdessSettings("localhost", 29952),
			new DbCreationSettings("postgres", "postgres")), 
      new InstallationSettings(installPgSqlPath: "C:\\pgserverbinaries", pgDataPath: "C:\\pgdata"),
		new RunSettings(true, true)), new RemoteHttpSourcesEngineInstalationResolver(),
    new RuntimePlatformResolver(),
	  new UniversalResolver());
dataBaseEngineService.StartAsync().Wait();
dataBaseEngineService.StopAsync().Wait();

dmp.dbenginelaucher's People

Contributors

rguryanov avatar

Watchers

James Cloos avatar

Forkers

jtone123

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.