diff --git a/docs/admin/system-admin.rst b/docs/admin/system-admin.rst index d6e41585..2baaf01b 100644 --- a/docs/admin/system-admin.rst +++ b/docs/admin/system-admin.rst @@ -30,3 +30,4 @@ The following are the most common system administration tasks. system_admin/enable-debug system_admin/admin-tricks system_admin/cleanup-cmds + system_admin/apply-license-ishell diff --git a/docs/admin/system_admin/apply-license-ishell.rst b/docs/admin/system_admin/apply-license-ishell.rst new file mode 100644 index 00000000..f4c684c2 --- /dev/null +++ b/docs/admin/system_admin/apply-license-ishell.rst @@ -0,0 +1,36 @@ +.. _apply-license-ishell: + +Apply license from ishell +========================= + +From the server RhodeCode Enterprise is running run ishell on the instance which we want to apply the license to: + +.. code-block:: bash + :dedent: 1 + + # starts the ishell interactive prompt + $ ./rcstack cli ishell + +This will open an ishell interactive console. Inside the console execute the following: + +``` +In [1]: from rc_license.models import apply_license +In [2]: license = """ + ...: PASTE LICENSE HERE + ...: """ +In [3]: apply_license(license) +Out[3]: True +In [4]: Session().commit() +exit +``` + +The paste license should look similar to the below + +``` +In [2]: license = """ + ...: eyJ2YWxpZF90aWxsIjogMTUwNTQ5NTUwMS40MzE4MzMsICJsYXN0X25hbWUiOiAic2QiLCAidmVyIjog + ...: MiwgInVzZXJzIjogMjUsICJjb21wYW55IjogImQiLCAic2lnbmF0dXJlIjogIkZQYTdhcWlBeUFDejFW + ...: YkthNlMyVUkzc09zN0k5eFpyb1BTTTRUdVUvZHlQK2lUTUdaeEgybTJvbFJ0MU1CbWVEQlVKR1ZhUUVW + ...: RHNNR1hvWDR3RExQUGszS0ZDckoxQU1NWWhGa0ZwUEFmTDViUTMrQ2Z2d1VkMzR4ZDM3OERZbzdaRHJs + ...: """ +```