Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLOC-4534] Install Kubernetes Flocker plugin #2965

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a31e6ac
Install kubernetes Ubuntu 16.04 packages
wallrj Oct 26, 2016
6de873b
Attempt to configure a master and nodes
wallrj Oct 26, 2016
2498c24
uninstall kubernetes....for easier testing
wallrj Oct 26, 2016
5bf1611
Add weave networking after the nodes have joined
wallrj Oct 26, 2016
af1e19f
Integrate the kubernetes configuration into the existing configure_cl…
wallrj Oct 27, 2016
eb2f708
Do the kubernetes provisioning from the manages runner.
wallrj Oct 27, 2016
b10116f
Import the repo key to a separate keyring and add docstrings.
wallrj Oct 27, 2016
163132d
Install Weave networking daemonset
wallrj Oct 31, 2016
b1b803e
Non-working Centos installation tasks
wallrj Nov 1, 2016
ab1f742
Merge remote-tracking branch 'origin/master' into install-kubernetes-…
wallrj Nov 7, 2016
23e6361
Start kublet and docker daemon separately.
wallrj Nov 7, 2016
4581f54
Merge remote-tracking branch 'origin/master' into install-kubernetes-…
wallrj Nov 10, 2016
36637e0
Juggle the setup steps and disable pre-flight checks to get kubadm wo…
wallrj Nov 10, 2016
cbaa827
Fix task names for documentation tasks import.
wallrj Nov 14, 2016
05bcc3c
Docstrings
wallrj Nov 14, 2016
2bfa812
Use the correct Ubuntu 14.04 repository
wallrj Nov 14, 2016
ac42332
Use a single argument to add-apt-repository
wallrj Nov 14, 2016
6ac3517
Don't attempt to delete kubernetes related containers
wallrj Nov 14, 2016
e98e40c
fix repo line
wallrj Nov 14, 2016
59463a7
The key must have a .gpg extension or it won't be used by the apt tools
wallrj Nov 15, 2016
b23ef69
Force ebtables to be installed since it's not a declared dependency o…
wallrj Nov 15, 2016
219f5da
Don't run acceptance tests on Ubuntu 14.04
wallrj Nov 15, 2016
813980b
Just enough to connect to Kubernetes API and create a namespace for t…
wallrj Nov 15, 2016
56e0afd
An attempt at a method to create any resource
wallrj Nov 15, 2016
49f7be8
Add logging to figure out why resources weren't being created.
wallrj Nov 16, 2016
4501359
Attempt to create a pod with a Flocker volume
wallrj Nov 16, 2016
ada9477
Configure the Kubernetes Flocker plugin
wallrj Nov 16, 2016
eb2c257
Create a Flocker volume before creating the pod
wallrj Nov 16, 2016
236802b
Merge remote-tracking branch 'origin/master' into install-kubernetes-…
wallrj Nov 29, 2016
7fe2a02
Merge remote-tracking branch 'origin/install-kubernetes-FLOC-4514' in…
wallrj Nov 29, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions admin/acceptance.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
)
from flocker.provision._install import (
ManagedNode,
deconfigure_kubernetes,
task_pull_docker_images,
uninstall_flocker,
install_flocker,
Expand Down Expand Up @@ -305,7 +306,7 @@ def __init__(self, node_addresses, package_source, distribution,
self.cert_path = cert_path
self.logging_config = logging_config

def _upgrade_flocker(self, reactor, nodes, package_source):
def _upgrade_flocker(self, dispatcher, nodes, package_source):
"""
Put the version of Flocker indicated by ``package_source`` onto all of
the given nodes.
Expand All @@ -324,8 +325,6 @@ def _upgrade_flocker(self, reactor, nodes, package_source):

:return: A ``Deferred`` that fires when the software has been upgraded.
"""
dispatcher = make_dispatcher(reactor)

uninstalling = perform(dispatcher, uninstall_flocker(nodes))
uninstalling.addErrback(write_failure, logger=None)

Expand All @@ -335,6 +334,7 @@ def install(ignored):
install_flocker(nodes, package_source),
)
installing = uninstalling.addCallback(install)

return installing

def ensure_keys(self, reactor):
Expand All @@ -349,13 +349,21 @@ def start_cluster(self, reactor):
Don't start any nodes. Give back the addresses of the configured,
already-started nodes.
"""
dispatcher = make_dispatcher(reactor)
if self.package_source is not None:
upgrading = self._upgrade_flocker(
reactor, self._nodes, self.package_source
dispatcher, self._nodes, self.package_source
)
else:
upgrading = succeed(None)

deconfiguring_kubernetes = upgrading.addCallback(
lambda _ignored: perform(
dispatcher,
deconfigure_kubernetes(self._nodes),
)
)

def configure(ignored):
return configured_cluster_for_nodes(
reactor,
Expand All @@ -375,7 +383,7 @@ def configure(ignored):
provider="managed",
logging_config=self.logging_config,
)
configuring = upgrading.addCallback(configure)
configuring = deconfiguring_kubernetes.addCallback(configure)
return configuring

def stop_cluster(self, reactor):
Expand Down Expand Up @@ -1455,6 +1463,7 @@ def main(reactor, args, base_path, top_level):
reached_finally = False

def cluster_cleanup():
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dead code?

if not reached_finally:
print "interrupted..."
print "stopping cluster"
Expand Down
113 changes: 0 additions & 113 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1091,31 +1091,6 @@ job_type:
timeout: 45
directories_to_delete: *run_acceptance_directories_to_delete

run_acceptance_loopback_on_AWS_Ubuntu_Trusty_for:
on_nodes_with_labels: 'aws-ubuntu-xenial-T2Medium'
with_modules: *run_full_acceptance_modules
with_steps:
- { type: 'shell',
cli: [ *hashbang, *add_shell_functions,
*cleanup, *setup_venv, *setup_flocker_modules,
*check_version,
'export DISTRIBUTION_NAME=ubuntu-14.04',
*build_sdist, *build_package,
*build_repo_metadata,
*setup_authentication,
'export ACCEPTANCE_TEST_MODULE=${MODULE}',
'export ACCEPTANCE_TEST_PROVIDER=aws',
*run_acceptance_loopback_tests,
*convert_results_to_junit,
*clean_packages,
*exit_with_return_code_from_test ]
}
clean_repo: true
archive_artifacts: *acceptance_tests_artifacts_ubuntu_special_case
publish_test_results: true
timeout: 45
directories_to_delete: *run_acceptance_directories_to_delete

run_acceptance_loopback_on_AWS_Ubuntu_Xenial_for:
on_nodes_with_labels: 'aws-ubuntu-xenial-T2Medium'
with_modules: *run_full_acceptance_modules
Expand Down Expand Up @@ -1340,36 +1315,6 @@ job_type:
directories_to_delete: []
notify_slack: '#nightly-builds'

run_acceptance_on_AWS_Ubuntu_Trusty_with_EBS:
at: '0 6 * * *'
# flocker.provision is responsible for creating the test nodes on
# so we can actually run run-acceptance-tests from GCE
on_nodes_with_labels: 'gce-ubuntu16'
with_steps:
- { type: 'shell',
cli: [ *hashbang, *add_shell_functions,
*cleanup, *setup_venv, *setup_flocker_modules,
*check_version,
'export DISTRIBUTION_NAME=ubuntu-14.04',
*build_sdist, *build_package,
*build_repo_metadata,
*setup_authentication,
'export ACCEPTANCE_TEST_MODULE=flocker.acceptance',
'export ACCEPTANCE_TEST_PROVIDER=aws',
*run_acceptance_tests,
*convert_results_to_junit,
*clean_packages,
*exit_with_return_code_from_test ]
}
clean_repo: true
archive_artifacts: *acceptance_tests_artifacts_ubuntu_special_case
publish_test_results: true
# Similar to the reasoning for run_acceptance_on_AWS_CentOS_7_with_EBS
# but slightly shorter since Ubuntu runs the tests faster.
timeout: 90
directories_to_delete: []
notify_slack: '#nightly-builds'

run_acceptance_on_AWS_Ubuntu_Xenial_with_EBS:
at: '0 6 * * *'
# flocker.provision is responsible for creating the test nodes on
Expand Down Expand Up @@ -1429,35 +1374,6 @@ job_type:
directories_to_delete: []
notify_slack: '#nightly-builds'

run_acceptance_on_GCE_Ubuntu_Trusty_with_GCE:
at: '0 6 * * *'
# flocker.provision is responsible for creating the test nodes on
# so we can actually run run-acceptance-tests from GCE
on_nodes_with_labels: 'gce-ubuntu16'
with_steps:
- { type: 'shell',
cli: [ *hashbang, *add_shell_functions,
*cleanup, *setup_venv, *setup_flocker_modules,
*check_version,
'export DISTRIBUTION_NAME=ubuntu-14.04',
*build_sdist, *build_package,
*build_repo_metadata,
*setup_authentication,
'export ACCEPTANCE_TEST_MODULE=flocker.acceptance',
'export ACCEPTANCE_TEST_PROVIDER=gce',
*run_acceptance_tests,
*convert_results_to_junit,
*clean_packages,
*exit_with_return_code_from_test ]
}
clean_repo: true
archive_artifacts: *acceptance_tests_artifacts_ubuntu_special_case
publish_test_results: true
# Reasoning as for run_acceptance_on_AWS_Ubuntu_Trusty_with_EBS
timeout: 90
directories_to_delete: []
notify_slack: '#nightly-builds'

run_acceptance_on_GCE_Ubuntu_Xenial_with_GCE:
at: '0 6 * * *'
# flocker.provision is responsible for creating the test nodes on
Expand Down Expand Up @@ -1516,35 +1432,6 @@ job_type:
directories_to_delete: []
notify_slack: '#nightly-builds'

run_acceptance_on_Rackspace_Ubuntu_Trusty_with_Cinder:
at: '0 6 * * *'
# flocker.provision is responsible for creating the test nodes on
# so we can actually run run-acceptance-tests from GCE
on_nodes_with_labels: 'gce-ubuntu16'
with_steps:
- { type: 'shell',
cli: [ *hashbang, *add_shell_functions,
*cleanup, *setup_venv, *setup_flocker_modules,
*check_version,
'export DISTRIBUTION_NAME=ubuntu-14.04',
*build_sdist, *build_package,
*build_repo_metadata,
*setup_authentication,
'export ACCEPTANCE_TEST_MODULE=flocker.acceptance',
'export ACCEPTANCE_TEST_PROVIDER=rackspace',
*run_acceptance_tests,
*convert_results_to_junit,
*clean_packages,
*exit_with_return_code_from_test ]
}
clean_repo: true
archive_artifacts: *acceptance_tests_artifacts_ubuntu_special_case
publish_test_results: true
# Reasoning as for run_acceptance_on_AWS_Ubuntu_Trusty_with_EBS
timeout: 90
directories_to_delete: []
notify_slack: '#nightly-builds'

run_acceptance_on_Rackspace_Ubuntu_Xenial_with_Cinder:
at: '0 6 * * *'
# flocker.provision is responsible for creating the test nodes on
Expand Down
Loading