Merlijn van Deen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/359736 )

Change subject: Extend Striker VagrantRoleStriker documentation page.
......................................................................

Extend Striker VagrantRoleStriker documentation page.

 * Fix some broken links
 * Change syntaxhighlight to pre (so SH does not need to be installed)
 * Some copyediting
 * Add JS snippets to quickly fill forms

Change-Id: I1fb49b9c967886e24dd476ff579fcb350a1d9385
---
M puppet/modules/role/templates/striker/VagrantRoleStriker.wiki.erb
1 file changed, 18 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/36/359736/1

diff --git a/puppet/modules/role/templates/striker/VagrantRoleStriker.wiki.erb 
b/puppet/modules/role/templates/striker/VagrantRoleStriker.wiki.erb
index 0f77ee6..4507d28 100644
--- a/puppet/modules/role/templates/striker/VagrantRoleStriker.wiki.erb
+++ b/puppet/modules/role/templates/striker/VagrantRoleStriker.wiki.erb
@@ -8,12 +8,15 @@
 ==Initial manual configuration==
 The Puppet automation for <code>role::striker</code> automates the process of 
installing the various software components needed to develop and test Striker, 
but there are some additional software configuration steps that must be 
performed manually.
 
+For some setup steps, a JavaScript snippet is included. Run this snippet in 
the browser console to automatically fill the relevant fields.
+
 ===Setup Phabricator===
 * Create admin user via the [<%= @phabricator_url %> web interface]
 ** The password you set here won't ever be used.
 ** You will link this account with the ldapwiki and devwiki Admin accounts 
once the LDAP and MediaWiki providers are configured.
 
 * [<%= @phabricator_url %>/auth/config/new/PhabricatorLDAPAuthProvider/ 
Configure an LDAP auth provider] connected to ldapwiki's LDAP server:
+** <code><nowiki>Q = function(s){return document.querySelector('[name="' + s + 
'"]')}; Q("ldap:host").value = "127.0.0.1"; Q("ldap:search-attribute").value = 
"ou=People,dc=wmftest,dc=net"; Q("ldap:search-attribute").value = "cn"; 
Q("ldap:always-search").checked = true;</nowiki></code>
 ** LDAP Hostname: <kbd>127.0.0.1</kbd>
 ** Base Distinguised Name: <kbd>ou=People,dc=wmftest,dc=net</kbd>
 ** Search Attributes <kbd>cn</kbd>
@@ -22,23 +25,27 @@
 * [<%= @phabricator_url %>/auth/link/ldap:self/ Connect admin user with 
ldapwiki account]
 
 * [<%= @phabricator_url %>/auth/config/new/PhabricatorMediaWikiAuthProvider/ 
Configure a MediaWiki auth provider] connected to devwiki:
+** <code><nowiki>Q = function(s){return document.querySelector('[name="' + s + 
'"]')}; Q("oauth1:mediawiki:name").value = "devwiki"; 
Q("oauth1:mediawiki:uri").value = "<%= scope['::mediawiki::server_url'] %>/w"; 
</nowiki></code>
 ** MediaWiki Instance Name: <kbd>devwiki</kbd>
 ** MediaWiki Base URI: <kbd><nowiki><%= scope['::mediawiki::server_url'] 
%></nowiki>/w</kbd>
 ** Follow the links and directions given in the Phabricator page
-** Use <kbd><%= @admin_email %></kbd> as the email address for the OAuth 
request
-** Be sure to check the ''Allow consumer to specify a callback in requests and 
use "callback" URL above as a required prefix.'' checkbox when registering the 
OAuth consumer.
+*** Be sure to check the ''Allow consumer to specify a callback in requests 
and use "callback" URL above as a required prefix.'' checkbox when registering 
the OAuth consumer.
+*** Use <kbd><%= @admin_email %></kbd> as the email address for the OAuth 
request
+
 
 * [<%= @phabricator_url %>/auth/link/mediawiki:devwiki/ Connect admin user 
with devwiki account]
 
 * [<%= @phabricator_url %>/people/new/bot/ Create a "striker" bot account]
+** <code><nowiki>Q = function(s){return document.querySelector('[name="' + s + 
'"]')}; Q("username").value = "striker";  Q("realname").value = "Striker Bot"; 
Q("email").value = "ad...@local.wmftest.net";</nowiki></code>
 ** Username: <kbd>striker</kbd>
 ** Real Name: <kbd>Tool Labs helper</kbd>
 ** Email: <kbd>stri...@local.wmftest.net</kbd>
 
-* [<%= @phabricator_url %>/settings/2/panel/apitokens/ Generate a Conduit API 
token for "striker"]
+* [<%= @phabricator_url %>/settings/user/Striker/page/apitokens/  Generate a 
Conduit API token for "striker"]
 ** Copy the API token for use later in [[#Setup_Striker|configuring the 
Striker app]]
 
 * [<%= @phabricator_url %>/project/edit/form/default/ Create a 
"Repository-Admins" project]
+** <code><nowiki>Q = function(s){return document.querySelector('[name="' + s + 
'"]')}; Q("name").value = "Repository-Admins"; Q("icon").value = "group"; 
Q("color").value="violet"; Q("policy.edit").value = "obj.project.members"; 
Q("policy.join").value = "admin";</nowiki></code>
 ** Name: <kbd>Repository-Admins</kbd>
 ** Icon: <kbd>Group</kbd>
 ** Color: <kbd>Violet</kbd>
@@ -50,12 +57,15 @@
 ** Default Edit Policy: <kbd>Repository-Admins</kbd>
 ** Can Create Repositories: <kbd>Repository-Admins</kbd>
 
-* [<%= @phabricator_url %>/conduit/method/project.query/ Lookup PHID of 
"Repository-Admins" group]
-** Names: <kbd>["Repository-Admins"]</kbd>
-** Copy the <code>"phid"</code> value for use later in 
[[#Setup_Striker|configuring the Striker app]]
+* Lookup PHID of "Repository-Admins" group
+** Option 1: On <%= @phabricator_url %>/project/profile/1/ , click "View All" 
and copy the PHID- identifier from the URL.
+** Option 2: [<%= @phabricator_url %>/conduit/method/project.query/ Using the 
API console ]
+*** Names: <kbd>["Repository-Admins"]</kbd>
+*** Copy the <code>"phid"</code> value for use later in 
[[#Setup_Striker|configuring the Striker app]]
 
 ===Setup Striker===
 * [<%= scope['::mediawiki::server_url'] 
%>/wiki/Special:OAuthConsumerRegistration/propose Register an OAuth consumer 
for Striker]
+** <code><nowiki>Q = function(s){return document.querySelector('[name="' + s + 
'"]')}; Q("wpname").value = "Striker"; Q("wpdescription").value = "Striker 
login"; Q("wpcallbackUrl").value = "http://<%= @vhost_name %>"; 
Q("wpcallbackIsPrefix").checked = true; Q("wpagreement").checked = true; 
Q("wpgranttype").value = "authonlyprivate";</nowiki></code>
 ** Application Name: <kbd>Tool Labs console</kbd>
 ** OAuth callback URL: <kbd><nowiki>http:</nowiki>//<%= @vhost_name %></kbd>
 ** Check the ''Allow consumer to specify a callback in requests and use 
"callback" URL above as a required prefix.'' checkbox.
@@ -65,13 +75,13 @@
 ** [<%= scope['::mediawiki::server_url'] 
%>/wiki/Special:OAuthManageConsumers/proposed Approve consumer]
 
 * Add your local OAuth and Phabricator configuration settings to 
<code>puppet/hieradata/local.yaml</code>
-:<syntaxhighlight lang="yaml">
+<pre>
 ---
 role::striker::oauth_consumer_key: <32 char consumer token>
 role::striker::oauth_consumer_secret: <40 char secret token>
 role::striker::phabricator_token: api-<28 chars>
 role::striker::phabricator_repo_admin_group: PHID-PROJ-<20 chars>
-</syntaxhighlight>
+</pre>
 * Run <code>vagrant provision</code> to update Striker's configuration.
 
 ==LDAP test data==

-- 
To view, visit https://gerrit.wikimedia.org/r/359736
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fb49b9c967886e24dd476ff579fcb350a1d9385
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <valhall...@arctus.nl>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to