Skip to content

Instantly share code, notes, and snippets.

@Spredzy
Created June 4, 2015 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Spredzy/1724c547b78ebfc13490 to your computer and use it in GitHub Desktop.
Save Spredzy/1724c547b78ebfc13490 to your computer and use it in GitHub Desktop.
Getting started with a module [with cherry-pick]
[root@node01 openstack]#
[root@node01 openstack]# git clone https://github.com/Spredzy/puppet-barbican-example.git
Cloning into 'puppet-barbican-example'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
[root@node01 openstack]# cookiecutter https://github.com/enovance/cookiecutter-openstack-puppet-modules
Cloning into 'cookiecutter-openstack-puppet-modules'...
remote: Counting objects: 139, done.
remote: Total 139 (delta 0), reused 0 (delta 0), pack-reused 139
Receiving objects: 100% (139/139), 25.93 KiB | 0 bytes/s, done.
Resolving deltas: 100% (58/58), done.
project_name (default is "YOURPROJECTNAME without 'puppet-'")? barbican
version (default is "0.0.1")?
year (default is "2015")?
[root@node01 openstack]# ll
total 4
drwxr-xr-x 6 root root 4096 Jun 4 19:51 puppet-barbican
drwxr-xr-x 3 root root 33 Jun 4 19:50 puppet-barbican-example
[root@node01 openstack]# cp -r puppet-barbican/* puppet-barbican-example/
cp: overwrite ‘puppet-barbican-example/README.md’? y
[root@node01 openstack]# cp puppet-barbican/.git
.gitignore .gitreview
[root@node01 openstack]# cp puppet-barbican/.gitignore puppet-barbican/.gitreview puppet-barbican/.fixtures.yml puppet-barbican-example/
[root@node01 openstack]# cd puppet-barbican-example/
[root@node01 puppet-barbican-example]# git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: README.md
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .fixtures.yml
# .gitignore
# .gitreview
# CHANGELOG
# LICENSE
# lib/
# manifests/
# metadata.json
# spec/
# tests/
no changes added to commit (use "git add" and/or "git commit -a")
[root@node01 puppet-barbican-example]# git add --all
[root@node01 puppet-barbican-example]# git commit -m "Initial Commit"
[master 5afd9ef] Initial Commit
Committer: root <root@node01.puppeels.mylezeem.com>
26 files changed, 1275 insertions(+), 2 deletions(-)
create mode 100644 .fixtures.yml
create mode 100644 .gitignore
create mode 100644 .gitreview
create mode 100644 CHANGELOG
create mode 100644 LICENSE
rewrite README.md (100%)
create mode 100644 lib/puppet/provider/barbican_config/ini_setting.rb
create mode 100644 lib/puppet/type/barbican_config.rb
create mode 100644 manifests/config.pp
create mode 100644 manifests/db/mysql.pp
create mode 100644 manifests/db/postgresql.pp
create mode 100644 manifests/db/sync.pp
create mode 100644 manifests/init.pp
create mode 100644 manifests/keystone/auth.pp
create mode 100644 manifests/logging.pp
create mode 100644 manifests/policy.pp
create mode 100644 metadata.json
create mode 100644 spec/classes/barbican_db_mysql_spec.rb
create mode 100644 spec/classes/barbican_db_postgresql_spec.rb
create mode 100644 spec/classes/barbican_keystone_auth_spec.rb
create mode 100644 spec/classes/barbican_logging_spec.rb
create mode 100644 spec/classes/barbican_policy_spec.rb
create mode 100644 spec/shared_examples.rb
create mode 100644 spec/unit/provider/barbican_config/ini_setting_spec.rb
create mode 100644 spec/unit/type/barbican_config_spec.rb
create mode 100644 tests/init.pp
[root@node01 puppet-barbican-example]# git push origin master
Counting objects: 45, done.
Compressing objects: 100% (35/35), done.
Writing objects: 100% (43/43), 13.32 KiB | 0 bytes/s, done.
Total 43 (delta 0), reused 0 (delta 0)
To https://github.com/Spredzy/puppet-barbican-example.git
cc42919..5afd9ef master -> master
64 history
[root@node01 puppet-barbican-example]# cd ../
[root@node01 openstack]# git clone https://review.openstack.org/stackforge/puppet-modulesync-configs
Cloning into 'puppet-modulesync-configs'...
remote: Counting objects: 20, done
remote: Finding sources: 100% (20/20)
remote: Total 20 (delta 0), reused 10 (delta 0)
Unpacking objects: 100% (20/20), done.
[root@node01 openstack]# cd puppet-modulesync-configs/
[root@node01 puppet-modulesync-configs]# git fetch https://review.openstack.org/stackforge/puppet-modulesync-configs refs/changes/59/177959/3 && git cherry-pick FETCH_HEAD
remote: Counting objects: 9, done
remote: Finding sources: 100% (6/6)
remote: Total 6 (delta 0), reused 5 (delta 0)
Unpacking objects: 100% (6/6), done.
From https://review.openstack.org/stackforge/puppet-modulesync-configs
* branch refs/changes/59/177959/3 -> FETCH_HEAD
[master 2454066] Manage default configs
Author: Sebastien Badia <sbadia@redhat.com>
3 files changed, 38 insertions(+), 1 deletion(-)
create mode 100644 config_defaults.yml
create mode 100644 modulesync.yml.sample
[root@node01 puppet-modulesync-configs]# git fetch https://review.openstack.org/stackforge/puppet-modulesync-configs refs/changes/60/177960/1 && git cherry-pick FETCH_HEAD
remote: Counting objects: 4, done
remote: Finding sources: 100% (3/3)
remote: Total 3 (delta 0), reused 2 (delta 0)
Unpacking objects: 100% (3/3), done.
From https://review.openstack.org/stackforge/puppet-modulesync-configs
* branch refs/changes/60/177960/1 -> FETCH_HEAD
[master 9e2af89] Add gitignore file (and ignore common files)
Author: Sebastien Badia <sbadia@redhat.com>
1 file changed, 4 insertions(+)
create mode 100644 .gitignore
[root@node01 puppet-modulesync-configs]# git fetch https://review.openstack.org/stackforge/puppet-modulesync-configs refs/changes/21/184921/1 && git cherry-pick FETCH_HEAD
remote: Counting objects: 12, done
remote: Finding sources: 100% (9/9)
remote: Total 9 (delta 1), reused 9 (delta 1)
Unpacking objects: 100% (9/9), done.
From https://review.openstack.org/stackforge/puppet-modulesync-configs
* branch refs/changes/21/184921/1 -> FETCH_HEAD
[master a3eec1c] hook: Add the Gerrit commit message hook for msync
Author: Sebastien Badia <sbadia@redhat.com>
1 file changed, 8 insertions(+)
create mode 100755 openstack-commit-msg-hook.sh
[root@node01 puppet-modulesync-configs]# git fetch https://review.openstack.org/stackforge/puppet-modulesync-configs refs/changes/44/184344/1 && git cherry-pick FETCH_HEAD
remote: Counting objects: 9, done
remote: Finding sources: 100% (5/5)
remote: Total 5 (delta 0), reused 3 (delta 0)
Unpacking objects: 100% (5/5), done.
From https://review.openstack.org/stackforge/puppet-modulesync-configs
* branch refs/changes/44/184344/1 -> FETCH_HEAD
[master 49473a0] Add rspec coverage output
Author: Sebastien Badia <sbadia@redhat.com>
1 file changed, 2 insertions(+)
[root@node01 puppet-modulesync-configs]# git fetch https://review.openstack.org/stackforge/puppet-modulesync-configs refs/changes/52/184352/2 && git cherry-pick FETCH_HEAD
remote: Counting objects: 16, done
remote: Finding sources: 100% (10/10)
remote: Total 10 (delta 0), reused 8 (delta 0)
Unpacking objects: 100% (10/10), done.
From https://review.openstack.org/stackforge/puppet-modulesync-configs
* branch refs/changes/52/184352/2 -> FETCH_HEAD
[master aafa7fd] Synchronize nodeset (split trusty and centos)
Author: Sebastien Badia <sbadia@redhat.com>
5 files changed, 38 insertions(+), 5 deletions(-)
create mode 100644 moduleroot/spec/acceptance/nodesets/centos-70-x64.yml
create mode 100644 moduleroot/spec/acceptance/nodesets/nodepool-centos7.yml
rename moduleroot/spec/acceptance/nodesets/{nodepool.yml => nodepool-trusty.yml} (83%)
create mode 100644 moduleroot/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
[root@node01 puppet-modulesync-configs]# git fetch https://review.openstack.org/stackforge/puppet-modulesync-configs refs/changes/94/184894/1 && git cherry-pick FETCH_HEAD
remote: Counting objects: 7, done
remote: Finding sources: 100% (4/4)
Unpacking objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 3 (delta 0)
From https://review.openstack.org/stackforge/puppet-modulesync-configs
* branch refs/changes/94/184894/1 -> FETCH_HEAD
[master c825a32] rake: Add a rake task to easily run acceptance tests
Author: Sebastien Badia <sbadia@redhat.com>
[root@node01 puppet-modulesync-configs]# cat > managed_modules.yml <<EOF
> ---
> - puppet-barbican-example
> EOF
[root@node01 puppet-modulesync-configs]# cat > modulesync.yml <<EOF
> ---
> namespace: Spredzy
> EOF
[root@node01 puppet-modulesync-configs]# msync update -m "[msync] this has been generated via msync"
Syncing puppet-barbican-example
Cloning repository fresh
Cloning from git@github.com:Spredzy/puppet-barbican-example.git
No config file under ./modules/puppet-barbican-example/.sync.yml found, using default values
[root@node01 puppet-modulesync-configs]#
---------------------------------------------
Module is ready
---------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment