Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

Commit

Permalink
@#31 | add k8s resource
Browse files Browse the repository at this point in the history
  • Loading branch information
hieptranquoc committed Apr 26, 2018
1 parent 4ec478d commit e8711de
Show file tree
Hide file tree
Showing 39 changed files with 1,588 additions and 381 deletions.
16 changes: 16 additions & 0 deletions .idea/kubernetes-stack-cookbook.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

304 changes: 304 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

21 changes: 10 additions & 11 deletions .kitchen.dokken.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
---
driver:
name: dokken
chef_version: latest
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
privileged: true # because Docker and SystemD/Upstart

transport:
name: dokken

provisioner:
name: dokken
deprecations_as_errors: true

verifier:
name: inspec

platforms:
- name: ubuntu-16.04
driver:
image: ubuntu:16.04
# pid_one_command: /bin/systemd
image: dokken/ubuntu-16.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get -y install curl lsb-release bash-completion
- name: centos-7
driver:
image: centos:7
privileged: true
# pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN yum -y install lsof which net-tools curl bash-completion

# - name: centos-7
# driver:
# image: dokken/centos-7
# pid_one_command: /usr/lib/systemd/systemd
45 changes: 21 additions & 24 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@ verifier:

platforms:
- name: ubuntu-16.04
- name: centos-7.3
# - name: centos-7

suites:
- name: smoke-install-default
- name: smoke-install
run_list:
- recipe[kubernetes-stack-test::default]
- recipe[kubernetes-stack-test::install]
verifier:
inspec_tests:
- test/smoke/default/default_test.rb
- test/smoke/gcloud/gcloud_install_default_test.rb
- test/smoke/kubectl/kubectl_install_default_test.rb
- test/smoke/gcloud/gcloud_install_default_test.rb
- test/smoke/helm/helm_install_default_test.rb
- test/smoke/minikube/minikube_install_default_test.rb
attributes:
kubernetes-stack:
kubectl:
Expand All @@ -37,36 +39,24 @@ suites:
helm:
enabled: true,
version: ""

- name: smoke-install-specific-version
run_list:
- recipe[kubernetes-stack-test::install]
verifier:
inspec_tests:
- test/smoke/default/default_test.rb
- test/smoke/gcloud/gcloud_install_specific_version_test.rb
- test/smoke/kubectl/kubectl_install_specific_version_test.rb
- test/smoke/helm/helm_install_specific_version_test.rb
attributes:
kubernetes-stack:
kubectl:
enabled: true,
version: "v1.7.0"
gcloud:
enabled: true,
version: "158.0.0"
helm:
minikube:
enabled: true,
version: "v2.4.2"
version: "v0.25.2"
k8s_version: ""
network_plugin: "cni"
bootstrapper: "kubeadm"
vm_driver: "none"

- name: smoke-uninstall
run_list:
- recipe[kubernetes-stack-test::uninstall]
verifier:
inspec_tests:
- test/smoke/default/default_test.rb
- test/smoke/gcloud/gcloud_uninstall_test.rb
- test/smoke/kubectl/kubectl_uninstall_test.rb
- test/smoke/helm/helm_uninstall_test.rb
- test/smoke/kubectl/kubectl_uninstall_test.rb
- test/smoke/minikube/minikube_install_default_test.rb
attributes:
kubernetes-stack:
kubectl:
Expand All @@ -78,3 +68,10 @@ suites:
helm:
enabled: true,
version: ""
minikube:
enabled: true,
version: "v0.25.2"
k8s_version: ""
network_plugin: "cni"
bootstrapper: "kubeadm"
vm_driver: "none"
30 changes: 19 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,41 @@ addons:
packages:
- chefdk

# Don't `bundle install` which takes about 1.5 mins
install: echo "skip bundle install"

services: docker

env:
matrix:
- INSTANCE=smoke-install-default-ubuntu-1604
- INSTANCE=smoke-install-default-centos-7
- INSTANCE=smoke-install-specific-version-ubuntu-1604
- INSTANCE=smoke-install-specific-version-centos-7
- INSTANCE=smoke-install-ubuntu-1604
# - INSTANCE=smoke-install-default-centos-7
# - INSTANCE=smoke-install-specific-version-ubuntu-1604
# - INSTANCE=smoke-install-specific-version-centos-7
- INSTANCE=smoke-uninstall-ubuntu-1604
- INSTANCE=smoke-uninstall-centos-7
# - INSTANCE=smoke-uninstall-centos-7

# Ensure we make ChefDK's Ruby the default
before_script:
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/cookstyle --version
- /opt/chefdk/embedded/bin/cookstyle
- foodcritic --version
- chef gem install kitchen-dokken

script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}

matrix:
include:
- before_script:
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
# - before_script:
# - eval "$(/opt/chefdk/bin/chef shell-init bash)"
# - script:
# - /opt/chefdk/embedded/bin/chef --version
# - /opt/chefdk/embedded/bin/cookstyle --version
# - /opt/chefdk/embedded/bin/cookstyle
# - /opt/chefdk/embedded/bin/rspec
- script:
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/cookstyle --version
- /opt/chefdk/embedded/bin/cookstyle
- chef exec delivery local all
- /opt/chefdk/embedded/bin/rspec
env: UNIT_AND_LINT=1
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please refer to https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

see:

- https://github.com/teracyhq-incubator/kubernetes-stack-cookbook/graphs/contributors
- https://github.com/teracyhq-incubator/kubernetes-stack-cookbook/graphs/contributors
Loading

0 comments on commit e8711de

Please sign in to comment.