Browse Source

update the instructions in README1st.markdown

Aaron Hicks 6 years ago
parent
commit
aa0ac1a575
1 changed files with 33 additions and 14 deletions
  1. 33
    14
      README1st.markdown

+ 33
- 14
README1st.markdown View File

@@ -9,15 +9,23 @@ Use this module to start a new blank puppet module with all the required compone
9 9
 ## Create a new blank module
10 10
 
11 11
 1. Clone this repository:
12
+
12 13
 	```
13 14
 	git clone -o puppet-blank -b master git://github.com/Aethylred/puppet-blank.git /path/to/new/repository
14 15
 	```
15
-2. Use the `unblank.ps1` script to customise the blank template
16
-3. Delete the `.orig` templates
17
-4. Add a new `origin` remote
16
+1. Use the `unblank.ps1` script to customise the blank template
17
+1. Delete clean up blank with `cleanup.ps1`
18
+1. Commit changes
19
+1. Add a new `origin` remote:
20
+
18 21
 	```
19 22
 	git remote add origin git@a.git.repo:reponame.git
20 23
 	```
24
+1. Push your changes:
25
+
26
+	```
27
+	git push origin master
28
+	```
21 29
 
22 30
 ## Windows scripts
23 31
 
@@ -31,18 +39,22 @@ Powershell will not run unsigned scripts by default, this can be enabled by exec
31 39
 2. Type "powershell" in the *Search programs and files* box, do not press enter.
32 40
 3. When *Powershell* shows up in the search results, right click and select *Run as administrator*
33 41
 4. Windows UAC may ask for permission to run as an administrator, click *Yes*
34
-5. Run the following command in the administrator Powershell:
42
+5. Run the following command in the administrator PowerShell:
43
+
35 44
 	```
36 45
 	set-executionpolicy remotesigned
37 46
 	```
38 47
 6. Press *Enter* again to confirm the policy change
39 48
 
49
+**NOTE:** You may need to repeat this in both PowerShell and PowerShell (x86) on 64-bit systems.
50
+
40 51
 ## Change author and module
41 52
 
42 53
 This updates the author and module name using the `.orig` templates. This script can be re-run, creating new templates. This may not be advisable in later stages of module development.
43 54
 
44 55
 1. Start Powershell in the blank module directory
45 56
 2. Run the `unblank.ps1` script:
57
+
46 58
 	```
47 59
 	.\unblank.ps1 newauthor newmodule
48 60
 	```
@@ -52,37 +64,44 @@ This updates the author and module name using the `.orig` templates. This script
52 64
 	git add Modulefile manifests\init.pp tests\init.pp
53 65
 	```
54 66
 4. Commit these changes to git:
67
+
55 68
 	```
56 69
 	git commit -am "Unblanked module with newauthor and newmodule"
57 70
 	```
58 71
 5. Add new remote repository:
72
+
59 73
 	```
60 74
 	git remote add origin git@git.repo.server:repository.git
61 75
 	```
62 76
 6. Push changes to origin:
77
+
63 78
 	```
64 79
 	git push origin master
65 80
 	```
66 81
 7. The new module is ready for further development
67 82
 
68
-## There's been an update to puppet-blank
83
+## Updating puppet-blank
69 84
 
70 85
 Just merge from the puppet-blank remote, though conflicts will be expected:
71
-	```
72
-	git pull puppet-blank master
73
-	```
86
+
87
+```
88
+git pull puppet-blank master
89
+```
74 90
 
75 91
 ## Cleaning up the puppet-blank files
76 92
 1. Start Powershell in the blank module directory
77 93
 2. Run the cleanup script:
94
+
78 95
 	```
79 96
 	.\cleanup.ps1
80 97
 	```
81 98
 3. Commit the changes to git:
99
+
82 100
 	```
83 101
 	git commit -am "Cleaned up with the puppet-blank cleanup script"
84 102
 	```
85 103
 4. Push changes to remote:
104
+
86 105
 	```
87 106
 	git push origin master
88 107
 	```
@@ -95,11 +114,12 @@ Just merge from the puppet-blank remote, though conflicts will be expected:
95 114
 
96 115
 1. To perform this step, the module will need to be cloned to a Linux server where puppet has been installed, and that the `UNKNOWN` entries in the `Modulefile` have been corrected.
97 116
 2. in the parent directory to the module, build the module metadata where the module is in the directory `puppet-module`:
117
+
98 118
 	```
99 119
 	puppet module build puppet-module
100 120
 	```
101
-3. Submit the resulting tarball to Puppet Forge as per:
102
-http://docs.puppetlabs.com/puppet/2.7/reference/modules_publishing.html
121
+3. Submit the resulting tarball to Puppet Forge as per [their instructions]
122
+(http://docs.puppetlabs.com/puppet/2.7/reference/modules_publishing.html)
103 123
 
104 124
 # Frequently Asked Questions
105 125
 
@@ -107,7 +127,8 @@ More like questions that should be asked.
107 127
 
108 128
 ## Why not use the puppet module generator?
109 129
 
110
-This module started with the standard module generation using 
130
+This module started with the standard module generation using
131
+
111 132
 	```
112 133
 	puppet module generate author-blank
113 134
 	```
@@ -116,11 +137,9 @@ This module started with the standard module generation using
116 137
 This module is intended for:
117 138
 
118 139
 1. Writing a module in an environment where puppet is not or can not be installed
119
-
120 140
 2. Use as a starting point for a collection of modules and prepopulated with things like licensing, boiler plate, pictures of cats, etc. etc.
121
-
122 141
 3. Writing a module in an environment where `puppet module generate` doesn't work, i.e. Windows.
123 142
 
124 143
 ## Why Windows powershell scripts?
125 144
 
126
-My $work environment is restricted to using Windows 7, so I required scripts that run under Windows 7. I used Powershell because it has regular expressions, which made this much easier than `.bat` batch files.
145
+My `$work` environment is restricted to using Windows 7, so I required scripts that run under Windows 7. I used Powershell because it has Perl-like regular expressions, which made this much easier than `.bat` batch files.

Loading…
Cancel
Save