Skip to content

Commit 3852742

Browse files
authored
Working integration to 0.23.0 (#2)
* Working create & Lookup * Aligned with latest alpha * Updated docs * Bump to 0.1.0
1 parent e9e11de commit 3852742

31 files changed

+2764
-903
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.0.1
3+
rev: v4.3.0
44
hooks:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
@@ -9,16 +9,16 @@ repos:
99
- id: fix-encoding-pragma
1010
- id: forbid-new-submodules
1111
- repo: https://github.com/asottile/pyupgrade
12-
rev: v2.31.1
12+
rev: v3.2.0
1313
hooks:
1414
- id: pyupgrade
1515
args: [ "--py38-plus" ]
1616
- repo: https://github.com/psf/black
17-
rev: 21.9b0
17+
rev: 22.10.0
1818
hooks:
1919
- id: black
2020
- repo: https://github.com/pycqa/isort
21-
rev: 5.9.3
21+
rev: 5.10.1
2222
hooks:
2323
- id: isort
2424
args: [ "--profile", "black", "--filter-files" ]
File renamed without changes.

docs/conf.py

Lines changed: 24 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,196 +1,92 @@
11
#!/usr/bin/env python
2-
#
3-
# ecs_composex_msk_cluster documentation build configuration file, created by
4-
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
5-
#
6-
# This file is execfile()d with the current directory set to its
7-
# containing dir.
8-
#
9-
# Note that not all possible configuration values are present in this
10-
# autogenerated file.
11-
#
12-
# All configuration values have a default; values that are commented out
13-
# serve to show the default.
14-
15-
# If extensions (or modules to document with autodoc) are in another
16-
# directory, add these directories to sys.path here. If the directory is
17-
# relative to the documentation root, use os.path.abspath to make it
18-
# absolute, like shown here.
19-
#
20-
import os
21-
import sys
22-
sys.path.insert(0, os.path.abspath('..'))
23-
24-
import ecs_composex_msk_cluster
25-
26-
# -- General configuration ---------------------------------------------
27-
28-
# If your documentation needs a minimal Sphinx version, state it here.
29-
#
30-
# needs_sphinx = '1.0'
31-
32-
# Add any Sphinx extension module names here, as strings. They can be
33-
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
2+
3+
import sphinx_material
4+
5+
try:
6+
import ecs_composex_msk_cluster
7+
except ImportError:
8+
import os
9+
import sys
10+
11+
sys.path.insert(0, os.path.abspath('..'))
12+
import ecs_composex_msk_cluster
13+
14+
3415
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
3516

36-
# Add any paths that contain templates here, relative to this directory.
3717
templates_path = ['_templates']
18+
source_suffix = ['.rst', '.md']
19+
# source_suffix = '.rst'
3820

39-
# The suffix(es) of source filenames.
40-
# You can specify multiple suffix as a list of string:
41-
#
42-
# source_suffix = ['.rst', '.md']
43-
source_suffix = '.rst'
44-
45-
# The master toctree document.
4621
master_doc = 'index'
47-
48-
# General information about the project.
49-
project = 'msk_cluster'
50-
copyright = "2022, John Preston"
22+
project = 'ecs_composex_msk_cluster'
23+
copyright = '2022, John "Preston" Mille'
5124
author = "John Preston"
5225

53-
# The version info for the project you're documenting, acts as replacement
54-
# for |version| and |release|, also used in various other places throughout
55-
# the built documents.
56-
#
57-
# The short X.Y version.
5826
version = ecs_composex_msk_cluster.__version__
59-
# The full version, including alpha/beta/rc tags.
6027
release = ecs_composex_msk_cluster.__version__
61-
62-
# The language for content autogenerated by Sphinx. Refer to documentation
63-
# for a list of supported languages.
64-
#
65-
# This is also used if you do content translation via gettext catalogs.
66-
# Usually you set "language" from the command line for these cases.
6728
language = None
6829

69-
# List of patterns, relative to source directory, that match files and
70-
# directories to ignore when looking for source files.
71-
# This patterns also effect to html_static_path and html_extra_path
7230
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
73-
74-
# The name of the Pygments (syntax highlighting) style to use.
7531
pygments_style = 'sphinx'
76-
77-
# If true, `todo` and `todoList` produce output, else they produce nothing.
7832
todo_include_todos = False
7933

80-
81-
# -- Options for HTML output -------------------------------------------
82-
83-
# The theme to use for HTML and HTML Help pages. See the documentation for
84-
# a list of builtin themes.
85-
#
86-
87-
import sphinx_material
88-
8934
extensions += [
9035
"sphinx.ext.todo",
9136
"sphinx.ext.viewcode",
9237
"sphinx.ext.autodoc",
38+
"sphinx_autodoc_typehints",
39+
"sphinx-jsonschema",
40+
"sphinx_material"
9341
]
9442

95-
html_theme = "sphinx_rtd_theme"
9643
autosummary_generate = True
9744
autoclass_content = "class"
9845

99-
html_baseurl = "https://docs"
46+
html_baseurl = "https://msk-cluster.docs.compose-x.io"
10047

101-
extensions.append("sphinx_material")
10248
html_theme_path = sphinx_material.html_theme_path()
10349
html_context = sphinx_material.get_html_context()
10450
html_theme = "sphinx_material"
105-
# Theme options are theme-specific and customize the look and feel of a
106-
# theme further. For a list of options available for each theme, see the
107-
# documentation.
108-
#
10951
html_theme_options = {
11052
# Set the name of the project to appear in the navigation.
111-
"nav_title": "msk_cluster",
112-
# Set you GA account ID to enable tracking
53+
"nav_title": "Compose-X MSK Cluster",
11354
# 'google_analytics_account': 'UA-XXXXX',
114-
# Specify a base_url used to generate sitemap.xml. If not
115-
# specified, then no sitemap will be built.
11655
"base_url": "https://docs.msk-cluster.ecs-composex.io",
11756
"html_minify": False,
11857
"html_prettify": True,
11958
"css_minify": True,
120-
# Set the color and the accent color
12159
"color_primary": "blue-grey",
12260
"color_accent": "white",
123-
# Set the repo location to get a badge with stats
12461
"repo_url": "https://github.com/compose-x/ecs_composex_msk_cluster/",
12562
"repo_name": "compose-x/ecs_composex_msk_cluster",
12663
"repo_type": "github",
127-
# Visible levels of the global TOC; -1 means unlimited
12864
"globaltoc_depth": 2,
129-
# If False, expand all TOC entries
13065
"globaltoc_collapse": True,
131-
# If True, show hidden TOC entries
13266
"globaltoc_includehidden": False,
13367
}
13468

135-
# Add any paths that contain custom static files (such as style sheets) here,
136-
# relative to this directory. They are copied after the builtin static files,
137-
# so a file named "default.css" will overwrite the builtin "default.css".
138-
html_static_path = ['_static']
69+
html_static_path = ["_static"]
13970
html_show_sourcelink = True
14071
html_sidebars = {
14172
"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
14273
}
14374

144-
# -- Options for HTMLHelp output ---------------------------------------
145-
146-
# Output file base name for HTML help builder.
14775
htmlhelp_basename = 'ecs_composex_msk_clusterdoc'
14876

149-
150-
# -- Options for LaTeX output ------------------------------------------
151-
152-
latex_elements = {
153-
# The paper size ('letterpaper' or 'a4paper').
154-
#
155-
# 'papersize': 'letterpaper',
156-
157-
# The font size ('10pt', '11pt' or '12pt').
158-
#
159-
# 'pointsize': '10pt',
160-
161-
# Additional stuff for the LaTeX preamble.
162-
#
163-
# 'preamble': '',
164-
165-
# Latex figure (float) alignment
166-
#
167-
# 'figure_align': 'htbp',
168-
}
169-
170-
# Grouping the document tree into LaTeX files. List of tuples
171-
# (source start file, target name, title, author, documentclass
172-
# [howto, manual, or own class]).
77+
latex_elements = {}
17378
latex_documents = [
17479
(master_doc, 'ecs_composex_msk_cluster.tex',
17580
'msk_cluster Documentation',
17681
'John Preston', 'manual'),
17782
]
17883

179-
# -- Options for manual page output ------------------------------------
180-
181-
# One entry per manual page. List of tuples
182-
# (source start file, name, description, authors, manual section).
18384
man_pages = [
18485
(master_doc, 'ecs_composex_msk_cluster',
18586
'msk_cluster Documentation',
18687
[author], 1)
18788
]
18889

189-
# -- Options for Texinfo output ----------------------------------------
190-
191-
# Grouping the document tree into Texinfo files. List of tuples
192-
# (source start file, target name, title, author,
193-
# dir menu entry, description, category)
19490
texinfo_documents = [
19591
(master_doc, 'ecs_composex_msk_cluster',
19692
'msk_cluster Documentation',

docs/history.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.. include:: ../HISTORY.rst
1+
.. include:: ../CHANGELOG.rst

docs/index.rst

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11

22
.. meta::
33
:description: ECS Compose-X MSK Cluster
4-
:keywords: AWS, ECS, docker, compose, MSK, kafka
4+
:keywords: AWS, ECS, MSK, compose
55

66
.. image:: https://img.shields.io/pypi/v/ecs_composex_msk_cluster.svg
77
:target: https://pypi.python.org/pypi/ecs_composex_msk_cluster
88

99

10-
This package is an extension to `ECS Compose-X`_ that manages Creation of new MSK clusters and automatically links
11-
to services to grant access and permissions.
10+
This package is an extension to `ECS Compose-X`_ to create or use AWS Managed Kafka Clusters (MSK).
1211

13-
Install
14-
==========
12+
Installation
13+
=============
1514

16-
.. code-block:: bash
15+
.. code-block::
1716
1817
python3 -m venv venv
1918
source venv/bin/activate
@@ -26,51 +25,27 @@ Install
2625
pip install pip -U
2726
pip install ecs-composex-msk-cluster
2827
29-
Syntax Reference
30-
==================
31-
32-
.. code-block:: yaml
33-
34-
x-msk_cluster:
35-
Properties: {}
36-
Lookup: {}
37-
Settings: {}
38-
Services: {}
39-
40-
Properties
41-
--------------
42-
43-
See `Properties for MSK Cluster`_ in AWS Cloudformation documentation.
44-
45-
46-
Lookup
47-
--------
48-
49-
Lookup is not yet implemented.
50-
51-
Services
52-
---------
53-
54-
Mappings between the MSK cluster and the services. To be implemented.
5528
29+
Usage
30+
=======
5631

57-
Test files
58-
===========
32+
To use this module, after installing it, set `x-msk_cluster` in your docker-compose file, and link your services to it.
33+
For example, with the Conduktor Platform
5934

60-
.. literalinclude:: ../use-cases/create_only/services.yaml
61-
:language: yaml
35+
.. code-block:: console
6236
37+
ecs-compose-x render -d templates -f use-cases/conduktor.yaml -p conduktor-msk-iam
6338
6439
.. _ECS Compose-X: https://docs.compose-x.io
65-
.. _Properties for MSK Cluster: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-cluster.html
6640

6741

6842
.. toctree::
6943
:maxdepth: 2
70-
:caption: x-msk_cluster:
44+
:caption: Content
7145

7246
installation
7347
usage
48+
syntax
7449
modules
7550
contributing
7651
authors

docs/installation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To install msk_cluster, run this command in your terminal:
1212

1313
.. code-block:: console
1414
15-
$ pip install ecs_composex_msk_cluster
15+
pip install ecs_composex_msk_cluster
1616
1717
This is the preferred method to install msk_cluster, as it will always install the most recent stable release.
1818

@@ -32,19 +32,19 @@ You can either clone the public repository:
3232

3333
.. code-block:: console
3434
35-
$ git clone git://github.com/compose-x/ecs_composex_msk_cluster
35+
git clone git://github.com/compose-x/ecs_composex_msk_cluster
3636
3737
Or download the `tarball`_:
3838

3939
.. code-block:: console
4040
41-
$ curl -OJL https://github.com/compose-x/ecs_composex_msk_cluster/tarball/master
41+
curl -OJL https://github.com/compose-x/ecs_composex_msk_cluster/tarball/master
4242
4343
Once you have a copy of the source, you can install it with:
4444

4545
.. code-block:: console
4646
47-
$ python setup.py install
47+
python3 -m pip install .
4848
4949
5050
.. _Github repo: https://github.com/compose-x/ecs_composex_msk_cluster

0 commit comments

Comments
 (0)