acore-server-bootstrap


Nameacore-server-bootstrap JSON
Version 1.2.1 PyPI version JSON
download
home_pagehttps://github.com/MacHu-GWU/acore_server_bootstrap-project
SummaryPackage short description.
upload_time2024-07-30 04:25:37
maintainerSanhe Hu
docs_urlNone
authorSanhe Hu
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements boto3 fire s3pathlib boto_session_manager loguru light_emoji vislog acore_conf acore_paths acore_constants acore_server jinja2
Travis-CI No Travis.
coveralls test coverage
            .. image:: https://readthedocs.org/projects/acore-server-bootstrap/badge/?version=latest
    :target: https://acore-server-bootstrap.readthedocs.io/en/latest/
    :alt: Documentation Status

.. image:: https://github.com/MacHu-GWU/acore_server_bootstrap-project/actions/workflows/main.yml/badge.svg
    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project/actions?query=workflow:CI

.. image:: https://codecov.io/gh/MacHu-GWU/acore_server_bootstrap-project/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/MacHu-GWU/acore_server_bootstrap-project

.. image:: https://img.shields.io/pypi/v/acore-server-bootstrap.svg
    :target: https://pypi.python.org/pypi/acore-server-bootstrap

.. image:: https://img.shields.io/pypi/l/acore-server-bootstrap.svg
    :target: https://pypi.python.org/pypi/acore-server-bootstrap

.. image:: https://img.shields.io/pypi/pyversions/acore-server-bootstrap.svg
    :target: https://pypi.python.org/pypi/acore-server-bootstrap

.. image:: https://img.shields.io/badge/Release_History!--None.svg?style=social
    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project/blob/main/release-history.rst

.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project

.. image:: https://img.shields.io/badge/Acore_Doc--None.svg?style=social&logo=readthedocs
    :target: https://acore-doc.readthedocs.io/en/latest/

------

.. image:: https://img.shields.io/badge/Link-Document-blue.svg
    :target: https://acore-server-bootstrap.readthedocs.io/en/latest/

.. image:: https://img.shields.io/badge/Link-API-blue.svg
    :target: https://acore-server-bootstrap.readthedocs.io/en/latest/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/acore-server-bootstrap#files


Welcome to ``acore_server_bootstrap`` Documentation
==============================================================================
.. image:: https://acore-server-bootstrap.readthedocs.io/en/latest/_static/acore_server_bootstrap-logo.png
    :target: https://acore-server-bootstrap.readthedocs.io/en/latest/

**项目背景**

在大规模游戏服务器 (Azerothcore) 部署的流程中, 我们通常会将其分为以下几个步骤:

1. 游戏服务器核心的编译.
2. 将编译好的游戏服务器打包成镜像.
3. 对用镜像启动的游戏服务器进行自动配置.

而 #3 这一步又可以分为以下几个步骤:

1. 创建数据库的 user.
2. 创建三个数据库 (auth, characters, world), 如果还没创建过的话.
3. 将必要的配置写入数据中 (realmlist).
4. 将最新的配置写入 ``*.conf`` 文件中.
5. 禁止 ubuntu 的自动升级.
6. 对游戏服务器的启动脚本赋予可执行权限.
7. 启动游戏服务器.
8. 安装其他服务器组件, 例如 SOAP Agent, DB Agent 等.

这一连串步骤在每次开新服, 或是修改了配置文件的时候都需要进行, 非常的麻烦. 为了解决这个问题, 我们开发了 ``acore_server_bootstrap`` 这个工具, 它可以帮助我们自动完成上述的所有步骤.

**Note**

    注意, 该工具假设服务器的文件目录严格遵循了 `acore_paths <https://github.com/MacHu-GWU/acore_paths-project>`_ 项目中的定义. 如果该假设不满足, 则无法使用该工具. 例如我们构建的服务器核心要在 ``/home/ubuntu/azeroth-server`` 目录下.

**Document**

如果想详细了解 bootstrap 的原理和所有命令的细节, 请阅读 `How bootstrap works <https://acore-server-bootstrap.readthedocs.io/en/latest/search.html?q=How+Bootstrap+Works&check_keywords=yes&area=default>`_

**Cheat Sheet**

如果你已经熟悉了 bootstrap 的原理, 可以直接查看 `Cheat Sheet <https://acore-server-bootstrap.readthedocs.io/en/latest/search.html?q=Cheat+Sheet&check_keywords=yes&area=default>`_ 来查看所有命令的用法.


.. _install:

Install
------------------------------------------------------------------------------

``acore_server_bootstrap`` is released on PyPI, so all you need is to:

.. code-block:: console

    $ pip install acore-server-bootstrap

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade acore-server-bootstrap

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MacHu-GWU/acore_server_bootstrap-project",
    "name": "acore-server-bootstrap",
    "maintainer": "Sanhe Hu",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "husanhe@gmail.com",
    "keywords": null,
    "author": "Sanhe Hu",
    "author_email": "husanhe@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/19/4f/2309963435bcb09d5cfc9521b4dc9d6ecb395e2c516a73d6385c855aa1e2/acore_server_bootstrap-1.2.1.tar.gz",
    "platform": "Windows",
    "description": ".. image:: https://readthedocs.org/projects/acore-server-bootstrap/badge/?version=latest\n    :target: https://acore-server-bootstrap.readthedocs.io/en/latest/\n    :alt: Documentation Status\n\n.. image:: https://github.com/MacHu-GWU/acore_server_bootstrap-project/actions/workflows/main.yml/badge.svg\n    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project/actions?query=workflow:CI\n\n.. image:: https://codecov.io/gh/MacHu-GWU/acore_server_bootstrap-project/branch/main/graph/badge.svg\n    :target: https://codecov.io/gh/MacHu-GWU/acore_server_bootstrap-project\n\n.. image:: https://img.shields.io/pypi/v/acore-server-bootstrap.svg\n    :target: https://pypi.python.org/pypi/acore-server-bootstrap\n\n.. image:: https://img.shields.io/pypi/l/acore-server-bootstrap.svg\n    :target: https://pypi.python.org/pypi/acore-server-bootstrap\n\n.. image:: https://img.shields.io/pypi/pyversions/acore-server-bootstrap.svg\n    :target: https://pypi.python.org/pypi/acore-server-bootstrap\n\n.. image:: https://img.shields.io/badge/Release_History!--None.svg?style=social\n    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project/blob/main/release-history.rst\n\n.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social\n    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project\n\n.. image:: https://img.shields.io/badge/Acore_Doc--None.svg?style=social&logo=readthedocs\n    :target: https://acore-doc.readthedocs.io/en/latest/\n\n------\n\n.. image:: https://img.shields.io/badge/Link-Document-blue.svg\n    :target: https://acore-server-bootstrap.readthedocs.io/en/latest/\n\n.. image:: https://img.shields.io/badge/Link-API-blue.svg\n    :target: https://acore-server-bootstrap.readthedocs.io/en/latest/py-modindex.html\n\n.. image:: https://img.shields.io/badge/Link-Install-blue.svg\n    :target: `install`_\n\n.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg\n    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project\n\n.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg\n    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg\n    :target: https://github.com/MacHu-GWU/acore_server_bootstrap-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Download-blue.svg\n    :target: https://pypi.org/pypi/acore-server-bootstrap#files\n\n\nWelcome to ``acore_server_bootstrap`` Documentation\n==============================================================================\n.. image:: https://acore-server-bootstrap.readthedocs.io/en/latest/_static/acore_server_bootstrap-logo.png\n    :target: https://acore-server-bootstrap.readthedocs.io/en/latest/\n\n**\u9879\u76ee\u80cc\u666f**\n\n\u5728\u5927\u89c4\u6a21\u6e38\u620f\u670d\u52a1\u5668 (Azerothcore) \u90e8\u7f72\u7684\u6d41\u7a0b\u4e2d, \u6211\u4eec\u901a\u5e38\u4f1a\u5c06\u5176\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4:\n\n1. \u6e38\u620f\u670d\u52a1\u5668\u6838\u5fc3\u7684\u7f16\u8bd1.\n2. \u5c06\u7f16\u8bd1\u597d\u7684\u6e38\u620f\u670d\u52a1\u5668\u6253\u5305\u6210\u955c\u50cf.\n3. \u5bf9\u7528\u955c\u50cf\u542f\u52a8\u7684\u6e38\u620f\u670d\u52a1\u5668\u8fdb\u884c\u81ea\u52a8\u914d\u7f6e.\n\n\u800c #3 \u8fd9\u4e00\u6b65\u53c8\u53ef\u4ee5\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4:\n\n1. \u521b\u5efa\u6570\u636e\u5e93\u7684 user.\n2. \u521b\u5efa\u4e09\u4e2a\u6570\u636e\u5e93 (auth, characters, world), \u5982\u679c\u8fd8\u6ca1\u521b\u5efa\u8fc7\u7684\u8bdd.\n3. \u5c06\u5fc5\u8981\u7684\u914d\u7f6e\u5199\u5165\u6570\u636e\u4e2d (realmlist).\n4. \u5c06\u6700\u65b0\u7684\u914d\u7f6e\u5199\u5165 ``*.conf`` \u6587\u4ef6\u4e2d.\n5. \u7981\u6b62 ubuntu \u7684\u81ea\u52a8\u5347\u7ea7.\n6. \u5bf9\u6e38\u620f\u670d\u52a1\u5668\u7684\u542f\u52a8\u811a\u672c\u8d4b\u4e88\u53ef\u6267\u884c\u6743\u9650.\n7. \u542f\u52a8\u6e38\u620f\u670d\u52a1\u5668.\n8. \u5b89\u88c5\u5176\u4ed6\u670d\u52a1\u5668\u7ec4\u4ef6, \u4f8b\u5982 SOAP Agent, DB Agent \u7b49.\n\n\u8fd9\u4e00\u8fde\u4e32\u6b65\u9aa4\u5728\u6bcf\u6b21\u5f00\u65b0\u670d, \u6216\u662f\u4fee\u6539\u4e86\u914d\u7f6e\u6587\u4ef6\u7684\u65f6\u5019\u90fd\u9700\u8981\u8fdb\u884c, \u975e\u5e38\u7684\u9ebb\u70e6. \u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898, \u6211\u4eec\u5f00\u53d1\u4e86 ``acore_server_bootstrap`` \u8fd9\u4e2a\u5de5\u5177, \u5b83\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u81ea\u52a8\u5b8c\u6210\u4e0a\u8ff0\u7684\u6240\u6709\u6b65\u9aa4.\n\n**Note**\n\n    \u6ce8\u610f, \u8be5\u5de5\u5177\u5047\u8bbe\u670d\u52a1\u5668\u7684\u6587\u4ef6\u76ee\u5f55\u4e25\u683c\u9075\u5faa\u4e86 `acore_paths <https://github.com/MacHu-GWU/acore_paths-project>`_ \u9879\u76ee\u4e2d\u7684\u5b9a\u4e49. \u5982\u679c\u8be5\u5047\u8bbe\u4e0d\u6ee1\u8db3, \u5219\u65e0\u6cd5\u4f7f\u7528\u8be5\u5de5\u5177. \u4f8b\u5982\u6211\u4eec\u6784\u5efa\u7684\u670d\u52a1\u5668\u6838\u5fc3\u8981\u5728 ``/home/ubuntu/azeroth-server`` \u76ee\u5f55\u4e0b.\n\n**Document**\n\n\u5982\u679c\u60f3\u8be6\u7ec6\u4e86\u89e3 bootstrap \u7684\u539f\u7406\u548c\u6240\u6709\u547d\u4ee4\u7684\u7ec6\u8282, \u8bf7\u9605\u8bfb `How bootstrap works <https://acore-server-bootstrap.readthedocs.io/en/latest/search.html?q=How+Bootstrap+Works&check_keywords=yes&area=default>`_\n\n**Cheat Sheet**\n\n\u5982\u679c\u4f60\u5df2\u7ecf\u719f\u6089\u4e86 bootstrap \u7684\u539f\u7406, \u53ef\u4ee5\u76f4\u63a5\u67e5\u770b `Cheat Sheet <https://acore-server-bootstrap.readthedocs.io/en/latest/search.html?q=Cheat+Sheet&check_keywords=yes&area=default>`_ \u6765\u67e5\u770b\u6240\u6709\u547d\u4ee4\u7684\u7528\u6cd5.\n\n\n.. _install:\n\nInstall\n------------------------------------------------------------------------------\n\n``acore_server_bootstrap`` is released on PyPI, so all you need is to:\n\n.. code-block:: console\n\n    $ pip install acore-server-bootstrap\n\nTo upgrade to latest version:\n\n.. code-block:: console\n\n    $ pip install --upgrade acore-server-bootstrap\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Package short description.",
    "version": "1.2.1",
    "project_urls": {
        "Download": "https://pypi.python.org/pypi/acore_server_bootstrap/1.2.1#downloads",
        "Homepage": "https://github.com/MacHu-GWU/acore_server_bootstrap-project"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f6f9d289b6e384b032684ec1f57d00dfe8d5f0fe1f9f92b6414f1f7b744759a",
                "md5": "19f17cb24959081ed9bf062d51e9518b",
                "sha256": "6184ff220b85a96300e802461ad0e09f6b52d19c9f45f5b01636d1fd25b32cd4"
            },
            "downloads": -1,
            "filename": "acore_server_bootstrap-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "19f17cb24959081ed9bf062d51e9518b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 36747,
            "upload_time": "2024-07-30T04:25:36",
            "upload_time_iso_8601": "2024-07-30T04:25:36.088248Z",
            "url": "https://files.pythonhosted.org/packages/3f/6f/9d289b6e384b032684ec1f57d00dfe8d5f0fe1f9f92b6414f1f7b744759a/acore_server_bootstrap-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "194f2309963435bcb09d5cfc9521b4dc9d6ecb395e2c516a73d6385c855aa1e2",
                "md5": "915584f74cf2c963ca3fbeb0fe161ec7",
                "sha256": "bf919cd93170e6e1041cddc62bf184dad171a8433b870c0d293cedc0fad017a7"
            },
            "downloads": -1,
            "filename": "acore_server_bootstrap-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "915584f74cf2c963ca3fbeb0fe161ec7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 33026,
            "upload_time": "2024-07-30T04:25:37",
            "upload_time_iso_8601": "2024-07-30T04:25:37.397995Z",
            "url": "https://files.pythonhosted.org/packages/19/4f/2309963435bcb09d5cfc9521b4dc9d6ecb395e2c516a73d6385c855aa1e2/acore_server_bootstrap-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-30 04:25:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MacHu-GWU",
    "github_project": "acore_server_bootstrap-project",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "boto3",
            "specs": []
        },
        {
            "name": "fire",
            "specs": [
                [
                    ">=",
                    "0.4.0"
                ],
                [
                    "<",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "s3pathlib",
            "specs": [
                [
                    ">=",
                    "2.1.2"
                ],
                [
                    "<",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "boto_session_manager",
            "specs": [
                [
                    ">=",
                    "1.7.2"
                ],
                [
                    "<",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "loguru",
            "specs": [
                [
                    ">=",
                    "0.7.0"
                ],
                [
                    "<",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "light_emoji",
            "specs": [
                [
                    "==",
                    "0.1.1"
                ]
            ]
        },
        {
            "name": "vislog",
            "specs": [
                [
                    ">=",
                    "0.1.2"
                ],
                [
                    "<",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "acore_conf",
            "specs": [
                [
                    ">=",
                    "0.1.2"
                ],
                [
                    "<",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "acore_paths",
            "specs": [
                [
                    "<",
                    "2.0.0"
                ],
                [
                    ">=",
                    "0.4.1"
                ]
            ]
        },
        {
            "name": "acore_constants",
            "specs": [
                [
                    ">=",
                    "0.3.1"
                ],
                [
                    "<",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "acore_server",
            "specs": [
                [
                    ">=",
                    "1.1.4"
                ],
                [
                    "<",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "jinja2",
            "specs": [
                [
                    "<",
                    "4.0.0"
                ],
                [
                    ">=",
                    "3.0.0"
                ]
            ]
        }
    ],
    "lcname": "acore-server-bootstrap"
}
        
Elapsed time: 1.93327s