Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename K8s templates and add image repo secret env
These changes are for the following: 1. Add the ability to specify K8s secret for secured image repositories, in Kubernetes single yaml generation templates. Secrets can be specified with follwoing var in common.env file: KUBERNETES_SECRET_CONTRAIL_REPO="<secret-name>" User is resposible to make sure that this secret exists. 2. Renamed Contrail single-yaml generation templates with appropriate names. 3. Added detailed README to introduce these templates. Change-Id: Ieae0d51bb5aa2f883a6ba9d5c59275682c14e55c Closes-Bug: #1773269
- Loading branch information
dineshb-jnpr
committed
Jun 21, 2018
1 parent
30b00cc
commit 567dd4d
Showing
8 changed files
with
119 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,67 @@ | ||
# Kubernetes manifests | ||
|
||
Just approache can be used to employ third-party software in Contrail setup. | ||
Details can be found in https://github.com/Juniper/contrail-container-builder/tree/master/containers/external README | ||
This directory hosts a series of templates that allow installation of Contrail | ||
on an existing Kubernetes cluster, using single yaml mode of installation. | ||
Each template caters to a specific deployment model of Contrail. | ||
These templates can be used to generate a single yaml file, that can inturn be | ||
used provision Contrail on a Kubernetes cluster. | ||
|
||
* contrail-template.yml | ||
# Provision | ||
|
||
Provisioning of Contrail on Kubernetes cluster is a 3 step process: | ||
|
||
Step 1. Clone this repository | ||
|
||
Step 2. Populate common.env file in the top directory of this repo. | ||
|
||
Some samples are made available in <repo-dir>/kubernetes/sample_config_files for | ||
standard deployment scenarios. | ||
|
||
Step 3. Install Contrail | ||
``` | ||
cd <repo-dir>/kubernetes/manifests | ||
./resolve-manifest.sh <template-file> | kubectl apply -f - | ||
``` | ||
|
||
# Templates | ||
|
||
The following is the brief description of each of those templates. | ||
You should choose the right template for your desired Contrail deployement model. | ||
|
||
* contrail-standalone-kubernetes.yaml | ||
|
||
To deploy standalone and all-in-one Contrail cluster. All Contrail components will be deployed. | ||
|
||
* contrail-dpdk-standalone-kubernetes.yml | ||
|
||
To deploy standalone and all-in-one Contrail cluster with DPDK for forwarding. | ||
All Contrail components will be deployed. | ||
|
||
* contrail-nested-kubernetes.yaml | ||
|
||
To deploy Contrail in a Nested deployment mode. This model is intended for scenarios where | ||
Contrail is providing networking function for an Openstack cluster and user would like to | ||
provision a Kubernetes cluster on Virtual Machines spawned on this Openstack cluster. | ||
|
||
In this model, only contrail control plane agent (i.e Contrail Kube-Manager) and data plane | ||
agent (i.e Contrail CNI) will be deployed in the overlay Kubernetes cluster. | ||
These agents will in-turn interface with Contrail Control and Data plane processes | ||
managing networking in the underlay Openstack cluster. | ||
|
||
* contrail-non-nested-kubernetes.yml | ||
|
||
To deploy Contrail in a non-nested non-standalone deployment model. In this mode, the Contrail control | ||
plane agent (i.e Contrail Kube-Manager) will be delployed to interface with Kubernetes control plane. | ||
For the data plane, this mode will install data plane agent(i.e Contrail CNI), data plane control | ||
module(contrail vrouter agent) and data plane forwarding module(contrail vrouter kernel module). | ||
|
||
These deployed components will interface with Contrail Control and Data plane processes that have been | ||
independently installed someplace else and are reachable by ip routing. | ||
|
||
|
||
* reference-templates/contrail-template.yaml | ||
|
||
A reference template file, capturing all possible and relevant config environments for Kubernetes | ||
deployment. This is strictly for reference and is not intended for yaml file generation. | ||
|
||
Uses custom containers based on stock ones for third-party software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
#!/bin/bash | ||
# Applies specified or default template to kubernetes, resolving it on the fly. | ||
# Default template will be the one for standalone deployment model. | ||
# Usage example: apply.sh contrail-tempate.yaml | ||
|
||
manifest_dir="${BASH_SOURCE%/*}" | ||
if [[ ! -d "$manifest_dir" ]]; then manifest_dir="$PWD"; fi | ||
|
||
template_file=${1:-$manifest_dir"/contrail-template.yaml"} | ||
template_file=${1:-$manifest_dir"/contrail-standalone-kubernetes.yaml"} | ||
|
||
$manifest_dir/resolve-manifest.sh "$template_file" | kubectl apply -f - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
#!/bin/bash | ||
# Deletes kubernetes contrail deployment specified by the temlate yaml, resolving it on the fly. | ||
# If no template is specified, will default to standalone deployment template. | ||
# Usage example: delete.sh contrail-tempate.yaml | ||
|
||
|
||
manifest_dir="${BASH_SOURCE%/*}" | ||
if [[ ! -d "$manifest_dir" ]]; then manifest_dir="$PWD"; fi | ||
|
||
template_file=${1:-$manifest_dir"/contrail-template.yaml"} | ||
template_file=${1:-$manifest_dir"/contrail-standalone-kubernetes.yaml"} | ||
|
||
$manifest_dir/resolve-manifest.sh "$template_file" | kubectl delete -f - |
File renamed without changes.