# puppet module build
[root@pulp-server ~]# cat /my-puppet-build/etc/puppet/modules/mymodule/Modulefilename 'myname-mymoduel'
version '1.0.0'
summary "This module ensures that myproducts are deployed precisely"
description "This module ensures that myproducts are deployed precisely"
[root@pulp-server ~]# puppet module build /my-puppet-build/etc/puppet/modules/mymodule
Notice: Building /my-puppet-build/etc/puppet/modules/mymodule for release
Module built: /my-puppet-build/etc/puppet/modules/mymodule/pkg/myname-mymodule-1.0.0.tar.gz
[root@pulp-server ~]# ls -al /my-puppet-build/etc/puppet/modules/mymodule/pkg
total 60
drwxr-xr-x 2 root root 4096 Feb 09 09:18 .
drwxrwxrwt. 5 root root 4096 Feb 09 14:50 ..
-rw-r--r-- 1 root root 50603 Feb 09 15:26 myname-mymodule-1.0.0.tar.gz
[root@pulp-server ~]# tar tzvf /my-puppet-build/etc/puppet/modules/mymodule/pkg/myname-mymodule-1.0.0.tar.gz
drwxr-xr-x root/root 0 2013-02-09 15:26 myname-mymodule-1.0.0/
-rw-r--r-- root/root 2269 2013-02-09 15:26 myname-mymodule-1.0.0/metadata.json
-rw-r--r-- root/root 224 2013-02-09 15:26 myname-mymodule-1.0.0/Modulefile
drwxr-xr-x root/root 0 2013-02-09 15:26 myname-mymodule-1.0.0/templates/
-rw-r--r-- root/root 30 2013-02-09 15:26 myname-mymodule-1.0.0/templates/mytemplate.erb
drwxr-xr-x root/root 0 2013-02-09 15:26 myname-mymodule-1.0.0/manifests/
-rw-r--r-- root/root 715 2013-02-09 15:26 myname-mymodule-1.0.0/manifests/mymodule.pp
# create puppet repo
[root@pulp-server ~]# pulp-admin -u admin -p admin puppet repo create --repo-id=myrepo-idSuccessfully created repository [myrepo-id]
# upload module
[root@pulp-server ~]# pulp-admin -u admin -p admin puppet repo uploads upload --repo-id=myrepo-id --dir /tmp/puppet-modules+----------------------------------------------------------------------+
Unit Upload
+----------------------------------------------------------------------+
Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: myname-mymodule-1.0.0.tar.gz
... completed
Creating upload requests on the server...
[==================================================] 100%
Initializing: myname-mymodule-1.0.0.tar.gz
... completed
Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
cancelled entirely using the cancel command.
Uploading: myname-mymodule-1.0.0.tar.gz
[==================================================] 100%
50603/50603 bytes
... completed
Importing into the repository...
... completed
Deleting the upload request...
... completed
# publish puppet repo
[root@pulp-server ~]# pulp-admin -u admin -p admin puppet repo publish run --repo-id=myrepo-id+----------------------------------------------------------------------+
Publishing Repository [myrepo-id]
+----------------------------------------------------------------------+
This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.
Publishing modules...
[==================================================] 100%
Module: 1/1 items
... completed
Generating repository metadata...
[-]
... completed
Publishing repository over HTTP...
... completed
Publishing repository over HTTPS...
... skipped
# pulp-admin search module
[root@pulp-server ~]# pulp-admin puppet repo modules --repo-id myrepo-id --str-eq "name=mymodule"
Name: mymodule
Version: 1.0.0
Author: myname
Dependencies:
Description: This module ensures that myproducts are deployed precisely
License: Apache License, Version 2.0
Project Page: UNKNOWN
Source: UNKNOWN
Summary: This module ensures that myproducts are deployed precisely
Tag List: None
Types:
# puppet module install
[root@puppet-master-server ~]# puppet module install --module_repository http://.:myrepo-id@pulp-server myname/mymodule
Notice: Preparing to install into /etc/puppet/modules ...
Notice: Downloading from http://.:myrepo-id@pulp-server ...
Notice: Installing -- do not interrupt ...
/etc/puppet/modules
+-- myname-mymodule (v1.0.0)