def test_can_create_taskrunner_instance(self): """fab.tests.tasks.task_runner_test Can create a TaskRunner instance""" mock_config_file_verifier = self.mox.CreateMock(ConfigFileVerifier) mock_config_file_verifier.exit_if_custom_user_credentials_not_found() self.mox.ReplayAll() self.assertIsInstance(TaskRunner.create(mock_config_file_verifier, self.mock_config_loader, self.mock_process_runner), TaskRunner)
def test_can_create_taskrunner_instance(self): """fab.tests.tasks.task_runner_test Can create a TaskRunner instance""" mock_config_file_verifier = self.mox.CreateMock(ConfigFileVerifier) mock_config_file_verifier.exit_if_custom_user_credentials_not_found() self.mox.ReplayAll() self.assertIsInstance( TaskRunner.create(mock_config_file_verifier, self.mock_config_loader, self.mock_process_runner), TaskRunner)
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath( os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source( "syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.tasks.app.deployment import DeployRSRApp from fab.tasks.runner import TaskRunner import execution.verification if __name__ == '__main__': execution.verification.display_usage_and_exit_if_host_config_spec_is_missing( os.path.basename(__file__)) TaskRunner.create().run_remote_deployment_task(DeployRSRApp, sys.argv[1])
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath(os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source("syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.tasks.database.migrate import RunNewDatabaseMigrations from fab.tasks.runner import TaskRunner import execution.verification if __name__ == '__main__': execution.verification.display_usage_and_exit_if_host_config_spec_is_missing(os.path.basename(__file__)) TaskRunner.create().run_remote_deployment_task(RunNewDatabaseMigrations, sys.argv[1])
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath( os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source( "syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.tasks.environment.linux.systempackages import VerifySystemPackages from fab.tasks.runner import TaskRunner import execution.verification if __name__ == '__main__': execution.verification.display_usage_and_exit_if_host_config_spec_is_missing( os.path.basename(__file__)) TaskRunner.create().run_deployment_task(VerifySystemPackages, sys.argv[1])
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath( os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source( "syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.tasks.environment.python.systempackages import UpdateSystemPythonPackages from fab.tasks.runner import TaskRunner import execution.verification if __name__ == '__main__': execution.verification.display_usage_and_exit_if_host_config_spec_is_missing( os.path.basename(__file__)) TaskRunner.create().run_deployment_task(UpdateSystemPythonPackages, sys.argv[1])
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath(os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source("syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.tasks.environment.python.systempackages import UpdateSystemPythonPackages from fab.tasks.runner import TaskRunner import execution.verification if __name__ == '__main__': execution.verification.display_usage_and_exit_if_host_config_spec_is_missing(os.path.basename(__file__)) TaskRunner.create().run_deployment_task(UpdateSystemPythonPackages, sys.argv[1])
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath( os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source( "syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.tasks.database.rebuild import RebuildRSRDatabase from fab.tasks.runner import TaskRunner import execution.verification if __name__ == '__main__': execution.verification.display_usage_and_exit_if_host_config_spec_is_missing( os.path.basename(__file__)) TaskRunner.create().run_remote_deployment_task(RebuildRSRDatabase, sys.argv[1])
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath(os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source("syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.tasks.environment.python.virtualenv.rsr import RebuildRSREnv from fab.tasks.runner import TaskRunner import execution.verification if __name__ == '__main__': execution.verification.display_usage_and_exit_if_host_config_spec_is_missing(os.path.basename(__file__)) TaskRunner.create().run_remote_deployment_task(RebuildRSREnv, sys.argv[1])
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath(os.path.join(os.path.dirname(__file__), "../../verifiers")) imp.load_source( "syspath_verification", os.path.join(VERIFIERS_HOME, "ensure_syspath_contains_deployment_scripts_home.py") ) from fab.tasks.environment.linux.systempackages import VerifySystemPackages from fab.tasks.runner import TaskRunner import execution.verification if __name__ == "__main__": execution.verification.display_usage_and_exit_if_host_config_spec_is_missing(os.path.basename(__file__)) TaskRunner.create().run_deployment_task(VerifySystemPackages, sys.argv[1])
VERIFIERS_HOME = os.path.realpath( os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source( "syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.tasks.environment.python.installer import InstallPython from fab.tasks.runner import TaskRunner import execution.verification SCRIPT_NAME = os.path.basename(__file__) def exit_if_python_version_missing(): if len(sys.argv) < 3: print '## Missing parameter: python_version' execution.verification.display_deployment_script_usage_and_exit( SCRIPT_NAME, '<python_version>') if __name__ == '__main__': execution.verification.display_usage_and_exit_if_host_config_spec_is_missing( SCRIPT_NAME, '<python_version>') exit_if_python_version_missing() TaskRunner.create().run_deployment_task( InstallPython, sys.argv[1], ['python_version=%s' % sys.argv[2]])
# Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath(os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source("syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.tasks.environment.python.installer import InstallPython from fab.tasks.runner import TaskRunner import execution.verification SCRIPT_NAME = os.path.basename(__file__) def exit_if_python_version_missing(): if len(sys.argv) < 3: print '## Missing parameter: python_version' execution.verification.display_deployment_script_usage_and_exit(SCRIPT_NAME, '<python_version>') if __name__ == '__main__': execution.verification.display_usage_and_exit_if_host_config_spec_is_missing(SCRIPT_NAME, '<python_version>') exit_if_python_version_missing() TaskRunner.create().run_deployment_task(InstallPython, sys.argv[1], ['python_version=%s' % sys.argv[2]])
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath(os.path.join(os.path.dirname(__file__), "../../verifiers")) imp.load_source( "syspath_verification", os.path.join(VERIFIERS_HOME, "ensure_syspath_contains_deployment_scripts_home.py") ) from fab.tasks.database.migrate import RunNewDatabaseMigrations from fab.tasks.runner import TaskRunner import execution.verification if __name__ == "__main__": execution.verification.display_usage_and_exit_if_host_config_spec_is_missing(os.path.basename(__file__)) TaskRunner.create().run_remote_deployment_task(RunNewDatabaseMigrations, sys.argv[1])
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath(os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source("syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.tasks.database.backup import BackupRSRDatabase from fab.tasks.runner import TaskRunner import execution.verification if __name__ == '__main__': execution.verification.display_usage_and_exit_if_host_config_spec_is_missing(os.path.basename(__file__)) TaskRunner.create().run_remote_deployment_task(BackupRSRDatabase, sys.argv[1])
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath( os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source( "syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.config.values.host import HostAlias from fab.tasks.data.retrieval import FetchRSRData from fab.tasks.runner import TaskRunner if __name__ == '__main__': TaskRunner.create().run_data_retrieval_task(FetchRSRData, HostAlias.DATA)
#!/usr/bin/env python # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import imp, os, sys VERIFIERS_HOME = os.path.realpath(os.path.join(os.path.dirname(__file__), '../../verifiers')) imp.load_source("syspath_verification", os.path.join(VERIFIERS_HOME, 'ensure_syspath_contains_deployment_scripts_home.py')) from fab.config.values.host import HostAlias from fab.tasks.data.retrieval import FetchRSRData from fab.tasks.runner import TaskRunner if __name__ == '__main__': TaskRunner.create().run_data_retrieval_task(FetchRSRData, HostAlias.DATA)