Commit Graph

23 Commits

Author SHA1 Message Date
Jeffrey Zhang 434b65c6ef Retire kolla-kubernetes project - step 3 remove project content
Depends-On: https://review.openstack.org/567779
Needed-By: https://review.openstack.org/568174
Change-Id: If5bdd602d5f5c8addba70235ac41c0a52cef2c11
2018-05-14 02:54:20 +00:00
Sam Betts df177f8429 Remove kolla-ansible dependencies
The secrets generator still fails if kolla-ansible isn't installed
because it continues to look for files installed from that package. This
patch changes the code to look at the ansible code location in the
kolla-kubernetes package.

Change-Id: Idd3e35b198ebf0d4c109906b18234bd06e74d48f
2017-05-18 12:03:31 +01:00
Jenkins 19d8ded283 Merge "Remove support for py34" 2017-04-17 17:30:22 +00:00
Steven Dake a1e0d65270 Import generate_passwords.py from kolla-ansible
This is a direct copy of generate_passwords.py from kolla-ansible to
remove the kolla-ansible dependency.

Change-Id: Ia8a19ee4e196c4bd5f6d42fe0f6ccfc36f0bfb7f
Partially-Implements: blueprint remove-deps
2017-04-14 19:03:04 -04:00
zhuzeyu 81b8483ade Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due
to the change from Ubuntu Trusty to Xenial, where only python3.5
is available. There is no need to continue to keep these settings.

Change-Id: Ic8fb72a0618db4099b149faf5282611bddb19080
2017-03-03 10:49:20 +08:00
Steven Dake 9af2006567 Add etc/kolla_kubernetes to installed directories
The etc directory examples were not packaged with kolla-kubernetes
and now they are.

Change-Id: I70afb9aa33de4b7d69b8ad505e01f4448c1b954f
2017-03-01 20:17:26 -05:00
Cao Xuan Hoang 6f127c1d18 Remove support for py33
Python 3.3 is not supported from Mitaka, as per Infra.
This patch removes the support for the same.

Change-Id: Ied7355b2c2368583194dfad2d3af4842ac01d915
2017-01-19 09:25:08 +07:00
Steven Dake 8e1233c656 Revert name in metadata back to kolla-kubernetes
This is blocking the release process

Change-Id: Iedeacfd8e365464f7e3c206ebc75ecfab3c443ce
2017-01-14 20:39:10 -07:00
Tin Lam d609177328 Fix python tox -e cover failure
Currently, running ``tox -e cover`` errors out and does not generate
the correct coverage report.  The problem is caused by (a) a typo in
``tox.ini``, and (b) a mix up between ``kolla_kubernetes`` vs.
``kolla-kubernetes`` in .coveragerc and setup.cfg.  This causes the
coverage report to not properly pick up the module. This patch set
addresses the problem.

Change-Id: I0a10c0eb563968f4b88a816276455a6afcf5df80
Closes-Bug: #1650266
2016-12-27 16:35:53 -06:00
Tony Xu b7a6b1b069 Update homepage with developer documentation page
Change-Id: I18b4ed2831e60b83a8b47c2f1983d2fcb2fef167
2016-09-24 14:17:50 +08:00
Kevin Fox 6b48695d90 CLI rework.
This Patch Set reworks the cli. For now, instead of replacing the
'kolla-kubernetes' tool it makes a new tool called 'kollakube'.
This new command requires less typing. Operators who will need to
type the command a lot, so shortening the cli will help over time.
In a future PS the old 'kolla-kubernetes' command will be removed.

It reworks the resource and template system to allow the operator
to specify multiple entries to be processed at once. This aligns
kollakube with kubectl behavior.

The 'resource-template' subcommand is renamed to just 'template'.

The 'resource-map' subcommand is renamed to just 'map'.

The 'template' subcommand drops the action argument as it has no
effect.

Aliases are added from 'resource' to 'res' and 'template' to 'tmpl'.

The 'kollakube' cli removes any workflow related subcommands as they
are unlikely to work well moving forward and will be replaced
shortly with an ansible workflow.

Change-Id: Ide7b5d391a4ac0a514c027cf761033d9eb94d152
2016-09-22 10:42:34 -07:00
David C Wang 3155b1e2d2 Git mv'd all bootstrap dir files into services dir
- No bug-fixes, blue-prints, nor code changes.
- Originally, kolla-kubernetes only used 3 types of kubernetes
resource files (job, pod, svc).  Bootstrap files (job) were separated
from service files (pod, svc).  Subcommands were tied directly to the
files their respective directories (bootstrap command -> ./bootstrap
dir, run command -> ./services dir).
- This was done because of the way kolla-kubernetes used to work.
Upon subcommand launch, all of the files in its respective
directory were jinja processed and then loaded into kubernetes (in
random order).
- Now that we have added a bunch of resources that require ordering
(disk, pv, pvc, etc), and kolla-kubernetes directly references each
type of file based on the configuration of
./etc/kolla-kubernetes/kolla-kubernetes.yml, we no longer need to
separate bootstrap and service files.

Change-Id: I595388a686330cfdeb662b9a0a8b52cc1d45c913
2016-07-19 20:51:04 +00:00
David C Wang 597a736664 Renamed/Moved files, Split some files, Renamed few classes
- Not a bug-fix nor blue-print, or even code change with exception of
  import paths and renaming.
- Moved cmd/shell.py to app.py, and renamed the class inside of it
  from KollaKubernetesShell to KollaKubernetesApp.
- Deleted type_utils.py and moved its type_utils class into
  utils.py:TypeUtils, and also its respective tests.
- Split cli/service.py into commands/cmd_service.py and
  commands/cmd_resource.py.  All original service commands
  (kill/run/bootstrap) are in cmd_service.py, and all of the new
  resource commnads (resource, resource-template, resource-map) are
  now in cmd_resource.py.
- Moved common/* files (utils.py, pathfinder.py) up one directory to
  parent for both files and tests.  There isn't much "common" about
  these files.
- Modified setup.cfg to reflect the new command locations.
- Any other files edited are because the import paths needed to
  change.

Change-Id: I35771734d77f59efe68f0bbc2dda7fea5a0096b8
2016-07-18 23:10:37 +00:00
David C Wang 4f6a068972 Separate CLI commands into discrete bits (smaller CLI commands)
- This is prep work, and a dependency for the Ansible workflow engine
as well as upcoming multi-node kolla-kubernetes patches.
- The original bootstrap/run/kill commands are still present, and left
untouched for the moment.  The workflow engine will replace these
monolithic commands.
- The original commands did quite a few things (process jinja, create
configmaps, create svcs, create pods) all at once.  Broke up each of
these discrete bits of logic into their own smaller CLI commands.
- Added new subcommand, used to create or delete kolla-kube resources
kolla-kubernetes resource [-h] <action> <resource-type> <service-name>
  <action>         One of [create|delete]
  <resource-type>  One of [configmap|disk|pv|pvc|svc|bootstrap|pod]
  <service-name>   One of [mariadb|memcached|keystone|horizon|
                   rabbitmq|glance|nova|neutron|swift]
- Added new subcommand, used to process templates for resources
kolla-kubernetes resource-template [-h] [--print-jinja-vars]
    [--print-jinja-keys-regex <print-jinja-keys-regex>] <action>
    <resource-type> <service-name> <template-file>
- Added new subcommand which allows an operator to discover and list
available services, resource types, and resource files.
kolla-kubernetes resource-map [-h] [--resource-type <resource-type>]
    [--service-name <service-name>]
- Made explicit the ordering of kolla-kube resources in
service_resources.yml.  Resources are explicity configured, instead of
discovered, because there is inherent dependency ordering required
when creating resources.  For example, services have a dependency
order of creation.  Disks, pv, pvc, svc, pods also require order.
Prior, we only needed to support pod and service definitions, which
were created in any order.
- Added ability to process jinja templates that are scripts.  This
leaves room for persistent disk creation in follow-on patch to support
multi-node kolla-kubernetes.
- The steps to create all resources for a working Horizon are:
kolla-kubernetes resource create svc mariadb
kolla-kubernetes resource create configmap mariadb
kolla-kubernetes resource create bootstrap mariadb
kolla-kubernetes resource create pod mariadb
kolla-kubernetes resource create svc memcached
kolla-kubernetes resource create configmap memcached
kolla-kubernetes resource create pod memcached
kolla-kubernetes resource create svc keystone
kolla-kubernetes resource create configmap keystone
kolla-kubernetes resource create bootstrap keystone
kolla-kubernetes resource create pod keystone
kolla-kubernetes resource create svc horizon
kolla-kubernetes resource create configmap horizon
kolla-kubernetes resource create pod horizon

Change-Id: Ie27ea4537cdbaf0922a14e3a5e24040e598e32e8
Partially-implements: blueprint kolla-kubernetes-cli
Partially-implements: blueprint ansible-orchestration
2016-07-13 20:38:51 +00:00
David C Wang 03513bb16f Refactor, speed up, and fix bugs in jinja template dict generation
- This patch is neither a bp nor bugfix... It is refactor only, with
  exception of adding two CLI commands to help debugging jinja
  templating.
- Enhancement: New CLI commands added
    kolla-kubernetes jinja template <path_to_template_file>
      Processes the template output using the jinja vars and prints
      to stdout.
    kolla-kubernetes jinja vars <service_name>
      Creates the jinja dict from the merged config files and prints
      to stdout
- The refactored code merges configuration files based on priority
  order into an python dict, which is applied to a jinja template to
  create files.
- Simplified code, removing much logic.
- Enhancement: Made things much faster.  Old algorithm ran recursively
  at Order(n) of the number of keys in each configuration file
  (hundreds of calls).  New algorithm runs iteratively at Order(n) of
  nested jinja variables (a few calls).  Each call to jinja creates a
  new environment and applies a template.
- Enhancement: Configuration files (kolla-kubernetes.yml, globals.yml,
  passwords.yml) are treated the same as the ansible configuration
  files, and these files may now reference jinja variables like the
  other ansible files.
- Fix: Old algorithm would flatten nested keys, accidentally
  overriding keys at higher levels.  For example, consider yaml:
  "docker_common_options":
    "environment":
      "KOLLA_CONFIG_STRATEGY": "COPY_ALWAYS"
  The issue would cause "KOLLA_CONFIG_STRATEGY" to accidentally end
  one at the root level.  This new algorithm allows key values to
  maintain their nested structure, which would be expected for
  templating consumers.
- Fix: Enabled all commands to process yaml files containing a stream
  of documents.  Validation will now be done by kubectl.  In the
  future, we'll pass it directly to kubectl for validation before
  submission.
- Verified: The differences between the old and new algorithm dict
  generation.  The only difference is the new algorithm does not
  flatten nested yaml.

Change-Id: Iad2572a90ed3955ed8555d7556fb7283b8ede17f
2016-07-06 01:26:44 +00:00
Liyi Meng 1b65bc4a5d Break deployment procedure into two steps
Step 1: setup configmaps and run bootstrap jobs
Step 2: run service

Partially-implements: blueprint kolla-kubernetes-cli
Co-authored-by: Ryan Hallisey <rhallise@redhat.com>
Change-Id: Ie074f21984ac89291e11e7b4798f3a18a8cc200e
2016-06-01 14:08:35 -04:00
Ken Wronkiewicz 35534887f7 Add bootstrap directory to usr/local/share/kolla-kubernetes
Existing code assumes that there's a directory services/ and that
the bootstrap directory is adjacent in the directory tree.

Change-Id: I9ce619d32f858473c0685655c7d20c511690b95b
2016-05-26 23:53:43 +00:00
Steve Noyes ff5e313e96 rename kolla_kubernetes back to shell to avoid import error
kolla_kubernetes.py has same name as package which caused import error:
from kolla_kubernetes.common import utils
ImportError: No module named common

Change-Id: I33e77cf098212b5fcc685cf06dd02cece054deb7
2016-05-19 15:42:27 -04:00
Liyi Meng 333f659964 Minor fix on the error cause by renaming
We renamed Shell.py into kolla_kubernetes.py, but forget to update
setup.cfg accordingly.

Change-Id: I9b7257d4af08b75ab10e1dfbabe42a15b268fa36
2016-05-19 15:26:14 +02:00
Jenkins 0b225f9563 Merge "Implement a command line to start/stop keystone services" 2016-05-10 18:42:50 +00:00
Davanum Srinivas 95e536aa49 Switch on warnerrors and universal wheel
The warnerrors boolean option is used to tell Sphinx builders to
treat warnings as errors which will cause sphinx-build to fail if
it encounters warnings. This is generally useful to ensure your
documentation stays clean once you have a good docs build.

since we are python 2 and 3 compatible we should create a
universal wheel distribution.

Change-Id: I2a45596590d20b50abd232e3b070454cc28113ad
2016-05-10 13:47:20 +00:00
Davanum Srinivas 7bd0c7566c Implement a command line to start/stop keystone services
Picked up code from old repositories. Main change is in service.py.

related blueprint kolla-kubernetes
implements blueprint kolla-kubernetes-cli

Change-Id: I9caefe557ac827ca7a3b8f9a1693d623cf369080
2016-05-09 16:11:34 -04:00
Ryan Hallisey 8171c0ad83 Initial Cookiecutter Commit. 2016-05-04 10:39:22 -04:00