diff --git a/HACKING.txt b/HACKING.txt index 7442c795f3..e737c1a463 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -195,7 +195,7 @@ not start by default. First create a superuser and start all MAAS services:: - $ bin/maas-region-admin createadmin + $ bin/maas-region createadmin $ make run Substitute your own email. The command will prompt for a choice of password. @@ -412,7 +412,7 @@ in ``src//models/__init__.py`` Generate the migration script with:: - $ ./bin/maas-region-admin makemigrations --name description_of_the_change maasserver + $ ./bin/maas-region makemigrations --name description_of_the_change maasserver This will generate a migration module named ``src/maasserver/migrations/builtin/_description_of_the_change.py``. @@ -432,7 +432,7 @@ If you need to perform data migration, very much in the same way, you will need to run Django's `makemigrations`_ command. For instance, if you want to perform changes to the ``maasserver`` application, run:: - $ ./bin/maas-region-admin makemigrations --empty --name description_of_the_change maasserver + $ ./bin/maas-region makemigrations --empty --name description_of_the_change maasserver This will generate a migration module named ``src/maasserver/migrations/builtin/_description_of_the_change.py``. @@ -458,13 +458,13 @@ the South_ migrations will be skipped because the Django_ migrations already provide the entire schema in the initial migration. All of this logic is performed on upgrade by the `dbupgrade` command.:: - $ bin/maas-region-admin dbupgrade + $ bin/maas-region dbupgrade In some testing case you might need to always run the South_ migrations before the Django_ migrations on a clean database. Using the `always-south` option on the `dbupgrade` command allows this testing scenario.:: - $ bin/maas-region-admin dbupgrade --always-south + $ bin/maas-region dbupgrade --always-south .. Note:: @@ -481,14 +481,14 @@ Examining the database manually If you need to get an interactive ``psql`` prompt, you can use `dbshell`_:: - $ bin/maas-region-admin dbshell + $ bin/maas-region dbshell .. _dbshell: https://docs.djangoproject.com/en/dev/ref/django-admin/#dbshell If you need to do the same thing with a version of MAAS you have installed from the package, you can use:: - $ sudo maas-region-admin dbshell --installed + $ sudo maas-region dbshell --installed You can use the ``\dt`` command to list the tables in the MAAS database. You can also execute arbitrary SQL. For example::: diff --git a/INSTALL.txt b/INSTALL.txt index a2f9a90d78..2f451747a1 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -266,7 +266,7 @@ Create a superuser account Once MAAS is installed, you'll need to create an administrator account:: - $ sudo maas-region-admin createadmin --username=root --email=MYEMAIL@EXAMPLE.COM + $ sudo maas-region createadmin --username=root --email=MYEMAIL@EXAMPLE.COM Substitute your own email address for MYEMAIL@EXAMPLE.COM. You may also use a different username for your administrator account, but "root" is a diff --git a/Makefile b/Makefile index 4b08ce665c..b4f016d58f 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ build: \ bin/maas \ bin/maas-probe-dhcp \ bin/maas-rack \ - bin/maas-region-admin \ + bin/maas-region \ bin/twistd.rack \ bin/twistd.region \ bin/test.cli \ @@ -95,7 +95,7 @@ bin/database: bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install database @touch --no-create $@ -bin/maas-region-admin bin/twistd.region: \ +bin/maas-region bin/twistd.region: \ data bin/buildout buildout.cfg versions.cfg setup.py $(js_enums) $(buildout) install region @touch --no-create $@ @@ -121,10 +121,10 @@ bin/test.e2e: bin/protractor bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install e2e-test @touch --no-create $@ -# bin/maas-region-admin is needed for South migration tests. bin/flake8 is +# bin/maas-region is needed for South migration tests. bin/flake8 is # needed for checking lint and bin/sass is needed for checking css. bin/test.testing: \ - bin/maas-region-admin bin/flake8 bin/sass bin/buildout \ + bin/maas-region bin/flake8 bin/sass bin/buildout \ buildout.cfg versions.cfg setup.py $(buildout) install testing-test @touch --no-create $@ @@ -277,11 +277,11 @@ copyright: check: clean test -docs/api.rst: bin/maas-region-admin src/maasserver/api/doc_handler.py syncdb - bin/maas-region-admin generate_api_doc > $@ +docs/api.rst: bin/maas-region src/maasserver/api/doc_handler.py syncdb + bin/maas-region generate_api_doc > $@ -sampledata: bin/maas-region-admin bin/database syncdb - $(dbrun) bin/maas-region-admin generate_sample_data +sampledata: bin/maas-region bin/database syncdb + $(dbrun) bin/maas-region generate_sample_data doc: bin/sphinx docs/api.rst bin/sphinx @@ -357,14 +357,14 @@ clean+db: clean distclean: clean $(warning 'distclean' is deprecated; use 'clean') -harness: bin/maas-region-admin bin/database - $(dbrun) bin/maas-region-admin shell --settings=maas.demo +harness: bin/maas-region bin/database + $(dbrun) bin/maas-region shell --settings=maas.demo dbharness: bin/database bin/database --preserve shell -syncdb: bin/maas-region-admin bin/database - $(dbrun) bin/maas-region-admin dbupgrade +syncdb: bin/maas-region bin/database + $(dbrun) bin/maas-region dbupgrade define phony_targets build @@ -495,9 +495,9 @@ services/rackd/@deps: bin/twistd.rack services/reloader/@deps: -services/regiond/@deps: bin/maas-region-admin +services/regiond/@deps: bin/maas-region -services/regiond2/@deps: bin/maas-region-admin +services/regiond2/@deps: bin/maas-region # # Package building diff --git a/buildout.cfg b/buildout.cfg index b42901536d..90c7fa84b5 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -81,13 +81,13 @@ test-eggs = eggs = ${region:test-eggs} entry-points = - maas-region-admin=maasserver:execute_from_command_line + maas-region=maasserver:execute_from_command_line twistd.region=twisted.scripts.twistd:run initialization = ${common:initialization} environ.setdefault("DJANGO_SETTINGS_MODULE", "maas.development") scripts = - maas-region-admin + maas-region twistd.region extra-paths = ${common:extra-paths} diff --git a/docs/conf.py b/docs/conf.py index 2779f2cabf..1d3b4d2da7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -281,7 +281,7 @@ man_pages = [ ('man/maas.8', 'maas', u'MAAS API commandline utility', [u'Canonical 2013-2014'], 8), - ('man/maas-region-admin.8', 'maas-region-admin', u'MAAS administration tool', + ('man/maas-region.8', 'maas-region', u'MAAS administration tool', [u'Canonical 2013-2014'], 8) ] diff --git a/docs/configure.rst b/docs/configure.rst index 47f686c009..ba390d0078 100644 --- a/docs/configure.rst +++ b/docs/configure.rst @@ -55,9 +55,9 @@ things. First, turn on SSL support in Apache:: Ensure that the Apache config file from ``etc/maas/maas-http.conf`` is included in ``/etc/apache2/conf.d/``, then set the default URL using the -``maas-region-admin`` command to use ``https`` instead of ``http``:: +``maas-region`` command to use ``https`` instead of ``http``:: - $ maas-region-admin local_config_set \ + $ maas-region local_config_set \ > --maas-url="https://localhost:5240/MAAS" Now, restart Apache:: diff --git a/docs/index.rst b/docs/index.rst index 5758239795..d0abd91c44 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -113,7 +113,7 @@ Command-line Tools .. toctree:: :maxdepth: 1 - man/maas-region-admin.8 + man/maas-region.8 man/maas.8 diff --git a/docs/maascli.rst b/docs/maascli.rst index bca6a33683..0f271e281e 100644 --- a/docs/maascli.rst +++ b/docs/maascli.rst @@ -40,7 +40,7 @@ command line. To obtain the key through the command line, run this command on the region controller (it requires root access):: - $ sudo maas-region-admin apikey --username=my-username + $ sudo maas-region apikey --username=my-username (Substitute your MAAS user name for my-username). diff --git a/docs/man/maas-region-admin.8.rst b/docs/man/maas-region.8.rst similarity index 90% rename from docs/man/maas-region-admin.8.rst rename to docs/man/maas-region.8.rst index 4dd69aed5b..cf3a385566 100644 --- a/docs/man/maas-region-admin.8.rst +++ b/docs/man/maas-region.8.rst @@ -1,11 +1,11 @@ -maas-region-admin ------------------ +maas-region +----------- Usage ^^^^^ -maas-region-admin [-h, --help] createadmin | changepassword | shell +maas-region [-h, --help] createadmin | changepassword | shell Description diff --git a/man/maas-region-admin.8 b/man/maas-region.8 similarity index 94% rename from man/maas-region-admin.8 rename to man/maas-region.8 index b3768a6490..7095f0f55f 100644 --- a/man/maas-region-admin.8 +++ b/man/maas-region.8 @@ -1,8 +1,8 @@ .\" Man page generated from reStructuredText. . -.TH "MAAS-REGION-ADMIN" "8" "October 15, 2015" "dev" "MAAS" +.TH "MAAS-REGION" "8" "October 15, 2015" "dev" "MAAS" .SH NAME -maas-region-admin \- MAAS administration tool +maas-region \- MAAS administration tool . .nr rst2man-indent-level 0 . diff --git a/services/dns/run b/services/dns/run index 047f8a30e8..95f0e6465d 100755 --- a/services/dns/run +++ b/services/dns/run @@ -34,10 +34,10 @@ bin/py -m provisioningserver.testing.bindfixture -- \ # Create MAAS' DNS config: do not overwrite an existing config file # as the writing of the full configuration might have happened already. -bin/maas-region-admin set_up_dns --no-clobber +bin/maas-region set_up_dns --no-clobber # Edit the fixture's named.conf to include MAAS' DNS config. -bin/maas-region-admin get_named_conf \ +bin/maas-region get_named_conf \ --edit --config_path "${homedir}/named.conf" # Run named. diff --git a/src/maas/demo.py b/src/maas/demo.py index 2b83f38ad9..1833aba6f8 100644 --- a/src/maas/demo.py +++ b/src/maas/demo.py @@ -27,7 +27,7 @@ # Connect to the DHCP server. TODO: Use the signals manager instead. DHCP_CONNECT = True -MAAS_CLI = abspath("bin/maas-region-admin") +MAAS_CLI = abspath("bin/maas-region") # For demo purposes, give nodes unauthenticated access to their metadata # even if we can't pass boot parameters. This is not safe; do not diff --git a/src/maas/settings.py b/src/maas/settings.py index 4e9df2f52e..293ed4615c 100644 --- a/src/maas/settings.py +++ b/src/maas/settings.py @@ -79,7 +79,7 @@ def _get_local_timezone(tzfilename='/etc/timezone'): DHCP_CONNECT = True # The MAAS CLI. -MAAS_CLI = 'sudo maas-region-admin' +MAAS_CLI = 'sudo maas-region' API_URL_REGEXP = '^/api/2[.]0/' METADATA_URL_REGEXP = '^/metadata/' diff --git a/src/maasserver/dns/zonegenerator.py b/src/maasserver/dns/zonegenerator.py index a32d40e32c..0af40c5eb3 100644 --- a/src/maasserver/dns/zonegenerator.py +++ b/src/maasserver/dns/zonegenerator.py @@ -94,7 +94,7 @@ class DNSException(MAASException): "The DNS server will use the address '%s', which is inside the " "loopback network. This may not be a problem if you're not using " "MAAS's DNS features or if you don't rely on this information. " - "Consult the 'maas-region-admin local_config_set --maas-url' command " + "Consult the 'maas-region local_config_set --maas-url' command " "for details on how to set the MAAS URL.") @@ -108,7 +108,7 @@ def get_dns_server_address(rack_controller=None, ipv4=True, ipv6=True): """Return the DNS server's IP address. That address is derived from the config maas_url or rack_controller.url. - Consult the 'maas-region-admin local_config_set --maas-url' command for + Consult the 'maas-region local_config_set --maas-url' command for details on how to set the MAAS URL. :param rack_controller: Optional rack controller to which the DNS server @@ -127,7 +127,7 @@ def get_dns_server_address(rack_controller=None, ipv4=True, ipv6=True): "Unable to find MAAS server IP address: %s. MAAS's DNS server " "requires this IP address for the NS records in its zone files. " "Make sure that the configuration setting for the MAAS URL has " - "the correct hostname. Consult the 'maas-region-admin " + "the correct hostname. Consult the 'maas-region " "local_config_set --maas-url' command." % e.strerror) diff --git a/src/maasserver/management/commands/template.py b/src/maasserver/management/commands/template.py index 691b19f4f6..854bb0e3ba 100644 --- a/src/maasserver/management/commands/template.py +++ b/src/maasserver/management/commands/template.py @@ -40,7 +40,7 @@ def _force_delete_all(verbosity, stdout): template.delete() if verbosity > 0: stdout.write("It would now be wise to run:\n") - stdout.write(" sudo maas-region-admin template update-defaults\n") + stdout.write(" sudo maas-region template update-defaults\n") class Command(BaseCommand): diff --git a/src/maasserver/server_address.py b/src/maasserver/server_address.py index 850ca3d777..ed32ef8706 100644 --- a/src/maasserver/server_address.py +++ b/src/maasserver/server_address.py @@ -40,7 +40,7 @@ def get_maas_facing_server_address(rack_controller=None, ipv4=True, ipv6=True): """Return address where nodes and workers can reach the MAAS server. The address is taken from the configured MAAS URL or `controller.url`. - Consult the 'maas-region-admin local_config_set' command for details on + Consult the 'maas-region local_config_set' command for details on how to set the MAAS URL. If there is more than one IP address for the host, the addresses diff --git a/src/maasserver/utils/__init__.py b/src/maasserver/utils/__init__.py index d43fea9b1d..f893e920df 100644 --- a/src/maasserver/utils/__init__.py +++ b/src/maasserver/utils/__init__.py @@ -46,7 +46,7 @@ def absolute_reverse(view_name, query=None, base_url=None, *args, **kwargs): calls Django's 'reverse' method and prefixes the result of that call with the configured MAAS URL. - Consult the 'maas-region-admin local_config_set --default-url' command for + Consult the 'maas-region local_config_set --default-url' command for details on how to set the MAAS URL. :param view_name: Django's view function name/reference or URL pattern diff --git a/src/maastesting/tests/test_dbupgrade.py b/src/maastesting/tests/test_dbupgrade.py index a65b2e0f24..b599a275e7 100644 --- a/src/maastesting/tests/test_dbupgrade.py +++ b/src/maastesting/tests/test_dbupgrade.py @@ -41,7 +41,7 @@ def execute_dbupgrade(self, always_south=False): env = os.environ.copy() env["DEV_DB_NAME"] = "test_maas_dbupgrade" env["MAAS_PREVENT_MIGRATIONS"] = "0" - mra = os.path.join(root, "bin", "maas-region-admin") + mra = os.path.join(root, "bin", "maas-region") cmd = [mra, "dbupgrade"] if always_south: cmd.append("--always-south") diff --git a/utilities/remote-reinstall b/utilities/remote-reinstall index f524e26fab..d6a98bf176 100755 --- a/utilities/remote-reinstall +++ b/utilities/remote-reinstall @@ -90,7 +90,7 @@ echo "Restarting services and ensuring migrations are up to date..." $ssh_run rm -rf /usr/share/maas/web/static/* $ssh_run mv /usr/lib/python3/dist-packages/maasserver/static/* /usr/share/maas/web/static/ $ssh_run service maas-regiond stop -$ssh_run maas-region-admin migrate +$ssh_run maas-region migrate sleep 1 $ssh_run service maas-regiond start $ssh_run service apache2 restart