mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 10:12:41 +01:00
Remove Drydock config options
Summary: Adding random config options has a higher cost now since we can't remove them without raising warnings in installs about missing/unknown config. These are a bit premature to expose just yet -- I might want to put them in web-based config, too. Test Plan: Grepped for strings. Reviewers: codeblock, btrahan Reviewed By: codeblock CC: aran Maniphest Tasks: T2255 Differential Revision: https://secure.phabricator.com/D4467
This commit is contained in:
parent
b04a6a1999
commit
c85cc932ef
2 changed files with 5 additions and 18 deletions
|
@ -1176,22 +1176,6 @@ return array(
|
|||
|
||||
// -- Drydock --------------------------------------------------------------- //
|
||||
|
||||
// Drydock is used to allocate various software resources. For example, it
|
||||
// allocates working copies so continuous integration tests can be executed.
|
||||
// It needs at least one host to allocate these resources on.
|
||||
//
|
||||
// Set this option to true to let Drydock use the localhost for allocations.
|
||||
// This is the simplest configuration, but the least scalable. You MUST
|
||||
// disable this if you run daemons on more than one machine -- if you do not,
|
||||
// a daemon on machine A may allocate a resource locally, and then a daemon
|
||||
// on machine B may try to access it.
|
||||
'drydock.localhost.enabled' => true,
|
||||
|
||||
// If the localhost is available to Drydock, specify the path on disk where
|
||||
// Drydock should write files. You should create this directory and make sure
|
||||
// the user that the daemons run as has permission to write to it.
|
||||
'drydock.localhost.path' => '/var/drydock/',
|
||||
|
||||
// If you want to use Drydock's builtin EC2 Blueprints, configure your AWS
|
||||
// EC2 credentials here.
|
||||
'amazon-ec2.access-key' => null,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
final class DrydockLocalHostBlueprint extends DrydockBlueprint {
|
||||
|
||||
public function isEnabled() {
|
||||
return PhabricatorEnv::getEnvConfig('drydock.localhost.enabled');
|
||||
// TODO: Figure this out.
|
||||
return true;
|
||||
}
|
||||
|
||||
public function canAllocateMoreResources(array $pool) {
|
||||
|
@ -20,7 +21,9 @@ final class DrydockLocalHostBlueprint extends DrydockBlueprint {
|
|||
}
|
||||
|
||||
protected function executeAllocateResource(DrydockLease $lease) {
|
||||
$path = PhabricatorEnv::getEnvConfig('drydock.localhost.path');
|
||||
// TODO: Don't hard-code this.
|
||||
$path = '/var/drydock/';
|
||||
|
||||
if (!Filesystem::pathExists($path)) {
|
||||
throw new Exception(
|
||||
"Path '{$path}' does not exist!");
|
||||
|
|
Loading…
Reference in a new issue