tag:blogger.com,1999:blog-178239792024-03-12T20:50:45.239-04:00DivByZero.comMuch ado about scripting, Linux & Eclipse: card subject to changenickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.comBlogger431125tag:blogger.com,1999:blog-17823979.post-80726201434861113932020-02-07T13:13:00.000-05:002020-02-07T14:15:24.658-05:00Fedora 31 / Rawhide in Windows Subsystem For Linux<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">So you want to do Fedora stuff without the hardware headaches and all the vitualization crap? </span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Well it's finally possible in Windows 10 to run Fedora 31 or even Rawhide (currently 32).</span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Here's what you need:</span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">1. Update Windows 10 Pro to the latest. Reboot ad nauseum as required.</span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">2. Enable the Windows Subsystem for Linux (WSL) if not already turned on. <a href="https://winaero.com/blog/enable-wsl-windows-10-fall-creators-update/">I used this guide</a>. Reboot again.</span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">3. Open the Microsoft Store and search for <a href="https://www.whitewaterfoundry.com/fedora-remix-for-wsl">Fedora Remix for WSL</a>. It was $5 when I bought it today - figured that was a small price to pay to avoid Alpine, Ubuntu and Debian WSL variants. Shoutout to Whitewater Foundry for the sale price. </span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-SgKKz6KnbeI/Xj2lKeScUOI/AAAAAAAA-60/H16v0uN9Zjk_wDkihMnY2xkLrO3uVcDCwCLcBGAsYHQ/s1600/fedora-wsl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="563" data-original-width="1147" height="314" src="https://1.bp.blogspot.com/-SgKKz6KnbeI/Xj2lKeScUOI/AAAAAAAA-60/H16v0uN9Zjk_wDkihMnY2xkLrO3uVcDCwCLcBGAsYHQ/s640/fedora-wsl.png" width="640" /></a></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">4. Launch the new app from Start > Apps > Fedora Remix for WSL</span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">5. This is where things got a bit ... unexpectedly annoying, but I did finally resolve my issue.</span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">6. At the command prompt, run these commands:</span></div>
<blockquote class="tr_bq" style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">
sudo su<br />
dnf update -y
</span>
</blockquote>
Then I tried to install more stuff...<br />
<blockquote class="tr_bq" style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">
dnf install -y buildah podman
</span>
</blockquote>
... but that's when things went sideways:
<br />
<blockquote class="tr_bq" style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">
RPM: error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
</span>
</blockquote>
7. After much googling, experimenting with db cache recovery, and learning way more low level rpm db commands than I ever wanted, I found a <a href="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/issues/46#issuecomment-564223395">simple solution</a>:
<br />
<blockquote class="tr_bq" style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">
rm -f /var/lib/.rpm.lock</span>
</blockquote>
<blockquote>
But somewhere along the way I had tried switching to Rawhide (didn't help!), so to go back to Fedora 31, I did this:
<br />
<blockquote class="tr_bq" style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">
</span>
<pre><span style="font-family: "courier new" , "courier" , monospace;"># see current release version at 32
cat /etc/*release
# enable/disable repos by hand - no rawhide, only fedora.
cd /etc/yum.repos.d/; vim *.repo
# out with the new, in with the old
yum remove generic-release
# re-enable any .repo files that were disabled by the uninstall of Fedora 32
for d in fedora*.rpmsave; do mv $d ${d/.rpmsave}; done
# reinstall removed packages
dnf history info $(dnf history | grep generic-release | grep Removed | \
sed -e "s#[ ]*\([0-9]\+\) | remove.\+#\1#")
# determine which packages were removed
dnf history info $(dnf history | grep generic-release | grep Removed | \
sed -e "s#[ ]*\([0-9]\+\) | remove.\+#\1#") | grep Removed | \
grep @@System | sed -e "s#[ ]*Removed \(.\+\).\(noarch\|fc.\+\).*#\1#"
# reinstall them
yum install --releasever=31 audit fedora-gpg-keys fedora-repos fedora-repos-rawhide \
generic-release generic-release-common initscripts setup shadow-utils
# verify back to 31
cat /etc/*release </span></pre>
<span style="font-family: "courier new" , "courier" , monospace;">
</span>
</blockquote>
</blockquote>
9. Back in business, can now install without dnf errors from fc31 packages.
<br />
<blockquote class="tr_bq" style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">
dnf -y install buildah podman<br />
dnf -y install hub<br />
dnf -y install python jq pip<br />
...
</span>
</blockquote>
10. Aside: to get a list of all the things you've installed in your Fedora machine, you can run:
<blockquote class="tr_bq" style="text-align: left;">
<pre><span style="font-family: "courier new" , "courier" , monospace;">for i in $(dnf history | grep -v "Altered" | grep install | \
sed -e "s#[\t ]\+\([0-9]\+\)[\t ]\+|.\+#\1#" | tac); do
dnf history info $i | grep Command | \
sed -e "s#.\+ : #dnf -y #";
done</span></pre>
</blockquote>
Next up... experimenting with an X server to do Fedora GUI apps inside Windows (without the need for VirtualBox 6.1, which seems to be much tetchier than 6.0 for multi-monitor support).
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-13509786278943075132020-01-16T15:08:00.000-05:002020-01-16T15:11:21.939-05:00Configuring CodeReady Workspaces 2.0 w/ Microsoft Active Directory user authentication<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">To use Microsoft Active Directory logins with CodeReady Workspaces, first deploy </span><br />
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">it to your OpenShift cluster. For Workspaces 2.0, OCP 4.2 is recommended (4.1 </span><br />
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">and 3.11 are also supported). </span><br />
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Once your deployment is started, sign in using the RH SSO:</span></div>
<div align="center">
<b id="docs-internal-guid-e964ccf0-7fff-b109-3e5a-66d6bb704d1c" style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="border: none; display: inline-block; height: 398px; overflow: hidden; width: 624px;"><img height="398" src="https://lh5.googleusercontent.com/q04x08Nq4pKInnhsXMAHQQsruGIJOAnP3wTeuxa0Ut0P9Ktq2EXtga9DXYsKLBtOp7Dx4gmKbgkovcbsTTa9EpthJMOikvMIbp063ZacbTIyLUlSv__l2xxo5klrIAESx6sEMJ7UoPu0fArKCQ" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></div>
<div align="center">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Select the “User Federation”:</span></div>
<div align="center">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="border: none; display: inline-block; height: 213px; overflow: hidden; width: 624px;"><img height="213" src="https://lh5.googleusercontent.com/2VMuqMQd8UMARbF5DA4-b-VG0mIO4QAxuKrDjJ9-XlqE7vCgOLwB7Gb6mgk4umldS2MNaY5TCwd2qOzXuYFTvw5mWqopaqZtlrV-2NP1FISlMKYZ-L8v8PvzQxG4qSTyXBKNzxsCgYSEvQxAsQ" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></div>
<div align="center">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Select “LDAP” for the external source:</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="border: none; display: inline-block; height: 228px; overflow: hidden; width: 624px;"><img height="228" src="https://lh5.googleusercontent.com/lMQh3MDcGtvaVxtARIwVYvK3FJiJpDHXHv3AjkF5rpNkzRPHjV6dB6huC7jkLI0zfpqe1p31x0MMJaG13XYgKvaA0fBgfOdZuNzjVFZ0SMO-K3frcByTKXjIyRPQwl_o7QOoBl0vaFElq7p1EA" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></div>
<div align="center">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Fill out the LDAP mandatory information and save it (DO NOT sync the users yet). </span><br />
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The value of </span><span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Username LDAP attribute</b> should match the value used below for <b>LDAP Attribute</b>. </span></div>
<div align="center">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="border: none; display: inline-block; height: 478px; overflow: hidden; width: 624px;"><img height="478" src="https://lh5.googleusercontent.com/6Hn24wBrKlz4AcsfXDtNVpbXmgte5q7PHdVbyG1iTN3DECCKJj-G0PQKQFSHxq8XXBEsCQl_GpRkxiML98VcussAsBsz85ZTaqZxPAYhYPvX3ZUqkb0v1TmsfC1_QddFbzTadZYoTDMsjoSYcg" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></div>
<div align="center">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Once saved, go the mapper:</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<img height="209" src="https://lh4.googleusercontent.com/VuCb4Rlttp6_KwdBu5-im-u-ahokA5pRYLeX1l_uGz7iU6JFCHL96K-iLkr7D3TmqcQ7a_q94lKxiOT2PtY4bLjVFvU7l4pWcRzQiWlldRBul0Ere0EVQf1dMEBap7EfmeuLJKJKYywPGIhSjQ" style="font-family: Calibri, sans-serif; font-size: 12pt; margin-left: 0px; margin-top: 0px; white-space: pre-wrap;" width="577" /></div>
<div align="center">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">In the list of LDAP attributes, remap the following two attributes:</span></div>
<div align="center">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="border: none; display: inline-block; height: 258px; overflow: hidden; width: 624px;"><img height="258" src="https://lh4.googleusercontent.com/ZVEDBVFCLFgZpGC7z7ScAxMY0ZWwQWza_oVLCpqDFI1fL0b60f4uRAbnNZKZNZpeMec6Af4q7g1WeFyraZTJrVcFyaa1q8c-I670gYDFvNYf9jNALl-KBRoDUL1BQhNc6yBYBui4MWu2mXuCIA" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Set </span><span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>LDAP attribute</b></span><span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> to “sAMAccountName”, to match the value set above for </span><span style="font-family: "calibri" , sans-serif; font-size: 12pt; white-space: pre-wrap;"><b>Username LDAP attribute</b>:</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="border: none; display: inline-block; height: 422px; overflow: hidden; width: 624px;"><img height="422" src="https://lh3.googleusercontent.com/PxlaksxXz1aM-HS9qmqHe4_vgp3qMadrk8Jy0WyDbfsqWwEj54JksTWunuznOwwH_eDlueDnO5tpojNRZ05kYtvNxaYRDJ8a9tkTdubrwQLaRu0s2SixuAkD3NvUxp9_U6fzzBSEpzLHExGo_w" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Save your changes.</span></div>
<div align="center">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Next, update the email mapper if needed (eg., set </span><span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>LDAP Attribute</b></span><span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> to “userPrincipalName” to store the user's email address:</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="border: none; display: inline-block; height: 415px; overflow: hidden; width: 624px;"><img height="415" src="https://lh5.googleusercontent.com/ZhDZN7yZpGFIZ-ejHeDBgREzMg6N2H02zlTcuwqtwcO8cHzx4vgesF05vuwcsioiBCRWHIFRV3VQEgYMGW0FuTb9AymtwkJCWF-cKmO8NN8Rdk0kdmQ3XGiOFqpmeIJPtMEIRvNk-NA8F_hSbQ" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></div>
<div align="center">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "calibri" , sans-serif; font-size: 12pt; vertical-align: baseline; white-space: pre-wrap;">Again, save your changes.</span></div>
<div>
<span style="font-family: "calibri" , sans-serif; font-size: 12pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Go back to the “setting” tab to sync users:</span></div>
<div align="center">
<br /></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="border: none; display: inline-block; height: 287px; overflow: hidden; width: 624px;"><img height="287" src="https://lh6.googleusercontent.com/IzkEth6oGvMTNLVd-AHWLKje7rM4BaEWAzOd2fGtexuV3sFdmXS2REr-w1bTnSCDBwoCZ6DYzFigMzur_p3gGCT-KiA6O8J_KZ-BGXOXfzVBtogqkP6oid8ZW4VNVwBQVcwxh2K2kocLr88J6A" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "calibri" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">That's it!
Now you can use Active Directory user logins in CodeReady Workspaces 2.
</span>
</div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-49661726389857136892020-01-14T11:19:00.002-05:002020-02-07T13:19:03.927-05:00Force Chrome to use hardware acceleration (performance enhancement under virtual box 6)<h3>
Moving to Fedora 31 on Virtual Box 6.1</h3>
<div>
<br /></div>
<div>
Last week I got a new Thinkpad T490s, and to celebrate I grabbed the latest Windows 10 Pro updates, installed Virtual Box 6.1, and <a href="https://gist.github.com/nickboldt/52d7031fab62bfab7ed15195ddfc9e7f">set up a new Fedora 31 VM</a>. </div>
<div>
<br /></div>
<div>
Everything was pretty smooth right out of the box but for two problems:</div>
<div>
<br /></div>
<div>
1. guest OS in Seamless mode slides UNDER Window's taskbar.</div>
<div>
2. Chrome 79.0.3945.117 (Official Build) (64-bit) performance was insanely sluggish and unusable inside the VM.</div>
<div>
<br /></div>
<div>
Still working on a fix for the first one, other than to hide the Windows taskbar when working on a single screen, and to assign my VM's xfce4-panel to run on a different pimary monitor by default than Windows' primary monitor (so they don't overlap). </div>
<div>
<br /></div>
<div>
But for the second issue, I found this solution - <a href="https://www.lifewire.com/hardware-acceleration-in-chrome-4125122"><b>forcing my VM's Chrome to use hardware acceleration</b></a>, by turning on a setting under <b>chrome://flags</b>:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-WMp58oi4YEc/Xh3pVE4EyKI/AAAAAAAA-is/F7pFXMgfd8QcCRj16PtbDEMkV53lKJXfQCLcBGAsYHQ/s1600/fix-chrome-in-virtual-box-6.1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="295" data-original-width="729" height="257" src="https://1.bp.blogspot.com/-WMp58oi4YEc/Xh3pVE4EyKI/AAAAAAAA-is/F7pFXMgfd8QcCRj16PtbDEMkV53lKJXfQCLcBGAsYHQ/s640/fix-chrome-in-virtual-box-6.1.png" width="640" /></a></div>
<div>
<br /></div>
<div>
And like that, voom. Chrome is responsive and useable again!</div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-67348578523688108772019-07-25T16:32:00.000-04:002019-07-25T16:56:23.770-04:00Deploying Che 7 with custom images (air gap environment) <div id="header" style="box-sizing: border-box; direction: ltr; margin: 0px auto; max-width: 62.5em; padding: 0px 0.9375em; position: relative; width: 657px;">
<div style="font-size: 16px;">
<span style="background-color: white; color: #222222; font-family: "helvetica" , "arial" , "freesans" , "clean" , sans-serif; font-size: 15px;">Number 5: deploying Che 7 behind a firewall (air gap environment) using </span></div>
<div style="font-size: 16px;">
<span style="background-color: white; color: #222222; font-family: "helvetica" , "arial" , "freesans" , "clean" , sans-serif; font-size: 15px;"><br /></span></div>
<span style="background-color: #f7f7f8; color: rgba(0 , 0 , 0 , 0.9); font-family: "droid sans mono" , "dejavu sans mono" , monospace; font-size: 13px; white-space: pre-wrap;">chectl --che-operator-cr-yaml=...</span></div>
<div id="header" style="box-sizing: border-box; direction: ltr; font-size: 16px; margin: 0px auto; max-width: 62.5em; padding: 0px 0.9375em; position: relative; width: 657px;">
<h1 style="border-bottom: 1px solid rgb(221, 221, 223); box-sizing: border-box; color: rgba(0, 0, 0, 0.85); direction: ltr; font-family: "Open Sans", "DejaVu Sans", sans-serif; font-size: 2.125em; font-style: normal; font-weight: 300; letter-spacing: -0.01em; line-height: 1.2; margin: 2.25rem 0px 0px; padding: 0px 0px 8px; text-rendering: optimizeLegibility; word-spacing: -0.05em;">
Deploying Che 7 with custom images</h1>
<h1 style="background-color: white; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-weight: 300; line-height: 1.4; margin: 0px 0px 1.25rem; padding: 1rem 0px 8px; text-rendering: optimizelegibility;">
<div id="header" style="box-sizing: border-box; color: rgba(0, 0, 0, 0.8); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 16px; margin: 0px auto; max-width: 62.5em; padding: 0px 0.9375em; position: relative; width: 657px;">
</div>
<div id="content" style="box-sizing: border-box; color: rgba(0, 0, 0, 0.8); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 16px; margin: 1.25em auto 0.625em; max-width: 62.5em; padding: 0px 0.9375em; position: relative; width: 657px;">
<div id="preamble" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="sectionbody" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="paragraph data-line-3" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 1.25rem; padding: 0px; text-rendering: optimizelegibility;">
Unlike <a href="https://divby0.blogspot.com/2019/06/deploying-che-7-to-minishift-with-chectl.html">Deploying Che 7 to Minishift 1.34+</a>, this doc will explain how to do an Eclipse Che 7 deployment with a custom resource yaml file to override the images used in the deployment.</div>
</div>
<div class="paragraph data-line-5" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 1.25rem; padding: 0px; text-rendering: optimizelegibility;">
This process can be used for many things, but in this example it’ll be in support of an <strong style="box-sizing: border-box; letter-spacing: -0.005em; line-height: inherit;">air gap environment</strong>, where an organization cannot directly see Quay or Red Hat Container Catalog, and must instead reference internally mirrored artifacts within their organization’s firewall.</div>
</div>
</div>
</div>
</div>
</h1>
<h2 id="_prerequisites" style="box-sizing: border-box; color: #ba3925; direction: ltr; font-family: "Open Sans", "DejaVu Sans", sans-serif; font-size: 1.6875em; font-weight: 300; letter-spacing: -0.01em; line-height: 1.2; margin: 1em 0px 0.5em; padding: 0px; text-rendering: optimizelegibility; word-spacing: -0.05em;">
Prerequisites</h2>
<h1 style="background-color: white; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-weight: 300; line-height: 1.4; margin: 0px 0px 1.25rem; padding: 1rem 0px 8px; text-rendering: optimizelegibility;">
<div style="box-sizing: border-box; color: rgba(0, 0, 0, 0.8); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 16px; margin: 1.25em auto 0.625em; max-width: 62.5em; padding: 0px 0.9375em; position: relative; width: 657px;">
<div class="sect1 data-line-7" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px 0px 0.625em;">
<div class="sectionbody" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="paragraph data-line-9" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 1.25rem; padding: 0px; text-rendering: optimizelegibility;">
You need the latest <a href="https://github.com/minishift/minishift/releases" style="background: none; box-sizing: border-box; color: #2156a5; line-height: inherit;" title="https://github.com/minishift/minishift/releases">Minishift</a> and <a href="https://github.com/che-incubator/chectl/releases" style="background: none; box-sizing: border-box; color: #2156a5; line-height: inherit;" title="https://github.com/che-incubator/chectl/releases">chectl</a> releases.</div>
</div>
<div class="paragraph data-line-11" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 1.25rem; padding: 0px; text-rendering: optimizelegibility;">
Fetch them like this (or similar):</div>
</div>
<div class="listingblock data-line-13" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.25em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); direction: ltr; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.8125em; line-height: 1.45; overflow-wrap: break-word; overflow-x: auto; padding: 1em; text-rendering: optimizespeed; white-space: pre-wrap;"><code style="box-sizing: border-box; color: inherit; display: block; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: inherit; line-height: inherit;">cd ~/bin
curl -sSL https://github.com/che-incubator/chectl/releases/download/20190724230954/chectl-linux -o chectl
chmod +x chectl</code></pre>
</div>
</div>
<div class="listingblock data-line-19" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.25em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); direction: ltr; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.8125em; line-height: 1.45; overflow-wrap: break-word; overflow-x: auto; padding: 1em; text-rendering: optimizespeed; white-space: pre-wrap;"><code style="box-sizing: border-box; color: inherit; display: block; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: inherit; line-height: inherit;">cd /tmp
curl -sSL https://github.com/minishift/minishift/releases/download/v1.34.1/minishift-1.34.1-linux-amd64.tgz -o minishift.tgz
tar xvzf minishift.tgz
mv minishift*/minishift ~/bin/
chmod +x ~/bin/minishift</code></pre>
</div>
</div>
</div>
</div>
</div>
</h1>
<h2 id="_procedure" style="box-sizing: border-box; color: #ba3925; direction: ltr; font-family: "Open Sans", "DejaVu Sans", sans-serif; font-size: 1.6875em; font-weight: 300; letter-spacing: -0.01em; line-height: 1.2; margin: 1em 0px 0.5em; padding: 0px; text-rendering: optimizelegibility; word-spacing: -0.05em;">
Procedure</h2>
<h1 style="background-color: white; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-weight: 300; line-height: 1.4; margin: 0px 0px 1.25rem; padding: 1rem 0px 8px; text-rendering: optimizelegibility;">
<div style="box-sizing: border-box; color: rgba(0, 0, 0, 0.8); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 16px; margin: 1.25em auto 0.625em; max-width: 62.5em; padding: 0px 0.9375em; position: relative; width: 657px;">
<div class="sect1 data-line-27" style="border-top: 1px solid rgb(231, 231, 233); box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="sectionbody" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="olist arabic data-line-29" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<ol class="arabic" style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1em; line-height: 1.6; list-style-position: outside; margin: 0px 0px 1.25em 1.75em; padding: 0px;">
<li class="data-line-29" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
Start up minishift. (See <a href="https://divby0.blogspot.com/2019/06/deploying-che-7-to-minishift-with-chectl.html">Start up Minishift</a> for some suggested default settings.)</div>
<div class="listingblock data-line-31" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.25em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); direction: ltr; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.8125em; line-height: 1.45; overflow-wrap: break-word; overflow-x: auto; padding: 1em; text-rendering: optimizespeed; white-space: pre-wrap;"><code style="box-sizing: border-box; color: inherit; display: block; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: inherit; line-height: inherit;">minishift start</code></pre>
</div>
</div>
</li>
<li class="data-line-35" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
Log in once startup is complete.</div>
<div class="listingblock data-line-37" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.25em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); direction: ltr; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.8125em; line-height: 1.45; overflow-wrap: break-word; overflow-x: auto; padding: 1em; text-rendering: optimizespeed; white-space: pre-wrap;"><code style="box-sizing: border-box; color: inherit; display: block; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: inherit; line-height: inherit;">oc login 192.168.MY.IP:8433 -u system -p admin</code></pre>
</div>
</div>
</li>
<li class="data-line-41" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
For Eclipse Che 7, pull <a href="https://github.com/eclipse/che-operator/blob/master/pkg/deploy/defaults.go" style="background: none; box-sizing: border-box; color: #2156a5; line-height: inherit;" title="https://github.com/eclipse/che-operator/blob/master/pkg/deploy/defaults.go">these images</a> and <a href="https://github.com/redhat-developer/codeready-workspaces/blob/master/devdoc/building/che7-custom-resource-airgap-pull-rename-push.sh">publish them</a> to your internal registry:</div>
<div class="ulist data-line-43" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 0.625em; padding: 0px;">
<ul style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1em; line-height: 1.6; list-style-position: outside; margin: 0px 0px 0px 1.25em; padding: 0px;">
<li class="data-line-43" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
eclipse/che-server:nightly</div>
</li>
<li class="data-line-44" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
eclipse/che-keycloak:nightly</div>
</li>
<li class="data-line-45" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
quay.io/eclipse/che-devfile-registry:nightly</div>
</li>
<li class="data-line-46" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
quay.io/eclipse/che-plugin-registry:nightly</div>
</li>
<li class="data-line-47" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
centos/postgresql-96-centos7:latest</div>
</li>
<li class="data-line-48" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
registry.access.redhat.com/ubi8-minimal:8.0</div>
</li>
</ul>
</div>
</li>
<li class="data-line-50" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
Create a <a href="https://github.com/redhat-developer/codeready-workspaces/blob/master/devdoc/building/che7-custom-resource-airgap.yaml">custom resource file</a>, which overrides the default image values from <a href="https://github.com/eclipse/che-operator/blob/master/pkg/deploy/defaults.go" style="background: none; box-sizing: border-box; color: #2156a5; line-height: inherit;" title="https://github.com/eclipse/che-operator/blob/master/pkg/deploy/defaults.go">che-operator defaults.go</a> to use your custom registry’s images.</div>
<div class="admonitionblock note data-line-53" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<table style="background: none; border-spacing: 0px; border: 0px; box-sizing: border-box; margin-bottom: 1.25em; width: 599px;"><tbody style="box-sizing: border-box;">
<tr style="box-sizing: border-box;"><td class="icon" style="box-sizing: border-box; color: rgba(0, 0, 0, 0.8); direction: ltr; font-size: inherit; line-height: 1.6; margin: 0px; padding: 0.5625em 0.625em; text-align: center; width: 80px;"><div class="title" style="box-sizing: border-box; direction: ltr; font-family: "Open Sans", "DejaVu Sans", sans-serif; font-weight: bold; margin: 0px; padding: 0px; text-transform: uppercase;">
NOTE</div>
</td><td class="content" style="border-left: 1px solid rgb(221, 221, 223); box-sizing: border-box; color: rgba(0, 0, 0, 0.6); direction: ltr; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin: 0px; padding: 0.5625em 1.25em 0.5625em 1.125em; text-rendering: optimizelegibility;"><div class="paragraph data-line-54" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; padding: 0px; text-rendering: optimizelegibility;">
To watch the events and verify which images are pulled, see <a href="https://divby0.blogspot.com/2019/06/discovering-containers-loaded-by-che-7.html">this post</a> before performing the next step.</div>
</div>
</td></tr>
</tbody></table>
</div>
</li>
<li class="data-line-57" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
Deploy Che to minishift using the custom resource file created above. In this example the namespace <code style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.9375em; letter-spacing: 0px; line-height: 1.45; overflow-wrap: break-word; padding: 0.1em 0.5ex; text-rendering: optimizespeed; word-spacing: -0.15em;">che-op</code> is used instead of the default <code style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.9375em; letter-spacing: 0px; line-height: 1.45; overflow-wrap: break-word; padding: 0.1em 0.5ex; text-rendering: optimizespeed; word-spacing: -0.15em;">che</code>:</div>
<div class="listingblock data-line-59" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.25em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); direction: ltr; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.8125em; line-height: 1.45; overflow-wrap: break-word; overflow-x: auto; padding: 1em; text-rendering: optimizespeed; white-space: pre-wrap;"><code style="box-sizing: border-box; color: inherit; display: block; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: inherit; line-height: inherit;">chectl server:start -a operator -p minishift \
--che-operator-cr-yaml=che7-custom-resource-airgap.yaml -n che-op</code></pre>
</div>
</div>
<div class="admonitionblock note data-line-65" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<table style="background: none; border-spacing: 0px; border: 0px; box-sizing: border-box; margin-bottom: 1.25em; width: 599px;"><tbody style="box-sizing: border-box;">
<tr style="box-sizing: border-box;"><td class="icon" style="box-sizing: border-box; color: rgba(0, 0, 0, 0.8); direction: ltr; font-size: inherit; line-height: 1.6; margin: 0px; padding: 0.5625em 0.625em; text-align: center; width: 80px;"><div class="title" style="box-sizing: border-box; direction: ltr; font-family: "Open Sans", "DejaVu Sans", sans-serif; font-weight: bold; margin: 0px; padding: 0px; text-transform: uppercase;">
NOTE</div>
</td><td class="content" style="border-left: 1px solid rgb(221, 221, 223); box-sizing: border-box; color: rgba(0, 0, 0, 0.6); direction: ltr; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin: 0px; padding: 0.5625em 1.25em 0.5625em 1.125em; text-rendering: optimizelegibility;"><div class="paragraph data-line-66" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; padding: 0px; text-rendering: optimizelegibility;">
If you use the minishift addon to deploy Che (which uses a deployment configuration instead of an operator), your custom resource file will not be used. The addon is deprecated.</div>
</div>
</td></tr>
</tbody></table>
</div>
</li>
<li class="data-line-69" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
You should see this:</div>
<a href="https://1.bp.blogspot.com/-DSkT-WmjK_A/XToPKdTV0tI/AAAAAAAA6N8/UArrE1QINUoMdfJ1yi4sdvUYclppFVQ1gCEwYBhgL/s1600/che7-custom-resource-chectl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="681" data-original-width="932" height="291" src="https://1.bp.blogspot.com/-DSkT-WmjK_A/XToPKdTV0tI/AAAAAAAA6N8/UArrE1QINUoMdfJ1yi4sdvUYclppFVQ1gCEwYBhgL/s400/che7-custom-resource-chectl.png" width="400" /></a><br /><br />
</li>
<li class="data-line-77" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
Once deployed, you should see these in your Minishift console:
<a href="https://1.bp.blogspot.com/-rW11OjYrgo4/XToPKHzbfsI/AAAAAAAA6N4/5lE_2flTcnURo6ESQM2SDjZuPwAekBuPgCEwYBhgL/s1600/che7-custom-resource-chectl-deployed.png" imageanchor="1" style="font-size: 16px; letter-spacing: normal; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="586" data-original-width="749" height="250" src="https://1.bp.blogspot.com/-rW11OjYrgo4/XToPKHzbfsI/AAAAAAAA6N4/5lE_2flTcnURo6ESQM2SDjZuPwAekBuPgCEwYBhgL/s320/che7-custom-resource-chectl-deployed.png" width="320" /></a></div>
</li>
<li class="data-line-77" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
The custom image reference can be seen in the yaml for the deployment:<br />
<br />
<a href="https://1.bp.blogspot.com/-w4A3mBTc4Os/XToPKckOnaI/AAAAAAAA6N8/0_T2-oDNCzg-LxLar5E01vbNYgnAYbo4gCEwYBhgL/s1600/che7-custom-resource-deployed-view-config.png" imageanchor="1" style="font-size: 16px; letter-spacing: normal; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="397" data-original-width="588" height="216" src="https://1.bp.blogspot.com/-w4A3mBTc4Os/XToPKckOnaI/AAAAAAAA6N8/0_T2-oDNCzg-LxLar5E01vbNYgnAYbo4gCEwYBhgL/s320/che7-custom-resource-deployed-view-config.png" width="320" /></a></div>
</li>
</ol>
</div>
</div>
</div>
</div>
</h1>
</div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-12641301771356968292019-07-19T12:20:00.000-04:002019-08-21T11:18:27.273-04:00Configuring Minishift for use with Eclipse Che and Red Hat CodeReady Workspaces<div style="background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px;">
<div class="paragraph" style="box-sizing: border-box; color: #222222; direction: ltr; font-family: "Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; margin-bottom: 1em; padding: 0px; text-rendering: optimizelegibility;">
Number 4 in my <a href="https://divby0.blogspot.com/search/label/che">Che series</a>... a quick guide for using Minishift, in order to test drive <a href="https://www.eclipse.org/che/docs/che-7/index.html">Che 7</a> or <a href="https://developers.redhat.com/products/codeready-workspaces/download">Red Hat CodeReady Workspaces</a>.<br />
<br />
If you're not running Windows as your host OS, your mileage may vary in terms of memory requirements and preferred virtual machine driver, but the suggestions below should work on most OSes... even the one with an incomplete <a href="https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux">sed implementation</a>.</div>
</div>
<div class="paragraph" style="box-sizing: border-box; color: #222222; direction: ltr; font-family: "Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px;">
</div>
<h2 id="user-content-set-up-minishift" style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;">
Get Minishift and <span style="font-family: "courier new" , "courier" , monospace;">oc</span></h2>
<div style="box-sizing: border-box;">
<div style="box-sizing: border-box;">
<div style="box-sizing: border-box; margin-bottom: 16px;">
Download and unpack the latest <code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;">minishift</code> v1.34.1 binary from here:</div>
</div>
<div style="box-sizing: border-box;">
<div style="box-sizing: border-box; margin-bottom: 16px;">
<a href="https://github.com/minishift/minishift/releases" style="background-color: transparent; box-sizing: border-box; color: #0366d6; text-decoration-line: none;">https://github.com/minishift/minishift/releases</a></div>
</div>
<div style="box-sizing: border-box;">
<div style="box-sizing: border-box; margin-bottom: 16px;">
You’ll also want the Openshift Origin Client Tools (<code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;">oc</code>) 4 or 3.11 from:</div>
</div>
<div style="box-sizing: border-box;">
<div style="box-sizing: border-box; margin-bottom: 16px;">
</div>
<ul>
<li><a href="https://mirror.openshift.com/pub/openshift-v4/clients/ocp/">https://mirror.openshift.com/pub/openshift-v4/clients/ocp/</a></li>
<li><a href="https://mirror.openshift.com/pub/openshift-v3/clients/">https://mirror.openshift.com/pub/openshift-v3/clients/</a></li>
</ul>
<br />
<div style="box-sizing: border-box; margin-bottom: 16px;">
Once downloaded and unpacked, put the <code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;">minishift</code> and <code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;">oc</code> executables in your ~/bin or some other folder that’s on your PATH.<br />
<br /></div>
</div>
</div>
</div>
<div style="background-color: white; box-sizing: border-box; color: #24292e; font-size: 16px; font-style: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<h2 id="user-content-start-up-minishift" style="border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; font-size: 1.5em; font-weight: 600; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;">
<a aria-hidden="true" class="anchor" href="https://github.com/redhat-developer/codeready-workspaces/blob/master/devdoc/building/building-crw.adoc#start-up-minishift" id="user-content-start-up-minishift" style="background-color: transparent; box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration: none;"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" fill-rule="evenodd"></path></svg></a>Configure Minishift</h2>
<div style="box-sizing: border-box;">
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 0px;">
On Windows, I use <a href="https://gitforwindows.org/">Git bash shell</a> for most shell commands.</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box;">
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; white-space: pre; word-break: normal;"># To prevent rate limiting when starting minishift, use a personal
</code># access token.
# You can create new one at https://github.com/settings/tokens
export MINISHIFT_GITHUB_API_TOKEN="f00cafebabel33t"
# Grant enough memory to run CRW 1.2 / Che 6 and workspaces
# 6G min for one workspace, plus 2G for each additional workspace
minishift config set memory 12G
# Grant enough disk for downloading container images
minishift config set disk-size 25G
# if not using default virtualization engine, eg., want Virtual Box, use
minishift config set vm-driver virtualbox
# enable cluster admin user
minishift addons install --defaults
minishift addons enable admin-user</pre>
</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 0px;">
On Windows, you might need to touch a file that your shell can’t find.</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box;">
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; white-space: pre; word-break: normal;">touch /c/Users/YOUR_LOGIN_HERE/.minishift/machines/minishift_kubeconfig</code></pre>
</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<table style="border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; display: block; margin-bottom: 16px; margin-top: 0px; overflow: auto; width: 866px;"><tbody style="box-sizing: border-box;">
<tr style="background-color: white; border-top: 1px solid rgb(198, 203, 209); box-sizing: border-box;"><td style="border: 1px solid rgb(223, 226, 229); box-sizing: border-box; padding: 6px 13px;"><div style="box-sizing: border-box;">
Note </div>
</td><td style="border: 1px solid rgb(223, 226, 229); box-sizing: border-box; padding: 6px 13px;">If it fails with error <code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;">Checking if requested OpenShift version 'v3.11.0' is valid … v3.11.0 is not a valid OpenShift versionFAIL</code>, try <a href="https://docs.microsoft.com/en-us/windows/wsl/about">WSL bash</a>.</td></tr>
</tbody></table>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box;">
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; white-space: pre; word-break: normal;"># start minishift oc cluster
minishift start</code></pre>
</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 0px;">
Once minishift starts successfully, you’re ready to deploy Che or CRW to the server.<br />
<br />
If minishift fails to come up, try killing and starting it again:</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box;">
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; white-space: pre; word-break: normal;">minishift stop
minishift start</code></pre>
</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 0px;">
Or delete it and try again:</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box;">
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; white-space: pre; word-break: normal;">minishift stop
minishift delete
minishift start</code></pre>
</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 0px;">
When successful, you should see something like this (use your actual IP address in place of <code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;">192.168.$YOUR_IP</code>):</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box;">
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; white-space: pre; word-break: normal;">OpenShift server started.
The server is accessible via web console at:
https://192.168.$YOUR_IP:8443/console</code></pre>
</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 0px;">
You can log into the above console URL using the special user = <code style="background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; margin: 0px; padding: 0.2em 0.4em;">system:admin</code> - full cluster admin privileges required to deploy an operator:</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box;">
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; white-space: pre; word-break: normal;">oc login 192.168.$YOUR_IP:8443 -u system:admin</code></pre>
</div>
</div>
<div style="box-sizing: border-box; font-weight: 400;">
<div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 0px;">
If you prefer to use a different user, you can grant that user cluster admin privileges:</div>
</div>
<div style="box-sizing: border-box;">
<div style="box-sizing: border-box;">
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-size: 13.6px; font-weight: 400; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; white-space: pre; word-break: normal;">oc adm policy --as=system:admin add-cluster-role-to-user cluster-admin admin # for admin user
oc adm policy --as=system:admin add-cluster-role-to-user cluster-admin developer # for developer user</code></pre>
<div style="font-weight: 400;">
<span style="font-family: "times new roman"; font-size: 1.5em; font-weight: 600;"><br />Deploy something!</span></div>
<div style="font-weight: 400;">
<br /></div>
If you want to install <b>CodeReady Workspaces 1.2</b>, download the Operator Installer from here:<br />
<ul style="font-weight: 400;">
<li><a href="https://developers.redhat.com/products/codeready-workspaces/download">https://developers.redhat.com/products/codeready-workspaces/download</a></li>
</ul>
<div style="font-weight: 400;">
<br /></div>
<div style="font-weight: 400;">
Set up your authentication with the new Red Hat Container Catalog's registry, registry.redhat.io:</div>
<ul style="font-weight: 400;">
<li><a href="https://access.redhat.com/RegistryAuthentication#using-authentication-3">https://access.redhat.com/RegistryAuthentication#using-authentication-3</a></li>
</ul>
<div style="font-weight: 400;">
<br /></div>
<div style="font-weight: 400;">
Run the <a href="https://access.redhat.com/documentation/en-us/red_hat_codeready_workspaces/1.2/html-single/administration_guide/index#installing_codeready-workspaces">installation</a> as follows:</div>
<div style="font-weight: 400;">
<br /></div>
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-size: 13.6px; font-weight: 400; line-height: 1.45; margin-bottom: 16px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">./deploy.sh -d</code></pre>
<span style="font-weight: 400;">Or, if you'd like to install </span><b>Che 7</b>, see <a href="https://divby0.blogspot.com/2019/06/deploying-che-7-to-minishift-with-chectl.html" style="font-weight: 400;">Deploying Che 7 to Minishift</a>.<br />
<br />
You can also use the built-in Che add-on in Minishift, but that approach is deprecated. Enable it as follows:<br />
<div style="font-weight: 400;">
</div>
<div style="box-sizing: border-box;">
<div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 0px;">
</div>
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; background-color: white; box-sizing: border-box; color: #24292e; font-family: "Times New Roman"; font-size: 16px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="box-sizing: border-box;">
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-size: 13.6px; line-height: 1.45; margin: 0px 0px 16px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; white-space: pre; word-break: normal;">minishift addons enable che; minishift addons apply \
--addon-env CHE_DOCKER_IMAGE=eclipse/che-server:nightly \
--addon-env OPENSHIFT_TOKEN=$(oc whoami -t) che
# switch to Che 7.0.0.RC3 plugin registry format (fixed in minishift v1.34.1)
# see https://github.com/minishift/minishift/commit/4c0a0c0b9cfb92798fef53e5c54e80ca71c5f715
minishift --profile che addons apply --addon-env PLUGIN__REGISTRY__URL=https://che-plugin-registry.openshift.io/v3 che</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-77187724522873697142019-07-04T13:26:00.002-04:002019-07-04T13:49:08.775-04:00Creating your own devfile registry<div class="paragraph" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-family: "Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; margin-bottom: 1em; padding: 0px; text-rendering: optimizelegibility;">
Third in this series... how to create and deploy your own custom devfile registry, so you can include your own stacks out of the box inside Che 7.</div>
</div>
<div class="paragraph" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-family: "Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px;">
</div>
<h1 style="background-color: white; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-weight: 300; line-height: 1.4; margin: 0px 0px 1.25rem; padding: 1rem 0px 8px; text-rendering: optimizelegibility;">
Creating your own devfile registry</h1>
<div class="sect1" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-family: "Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px 0px 1.33333em;">
<h2 id="_prerequisites" style="border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #325d72; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1.6em; line-height: 1.4; margin: 0.2em 0px 0.5em; padding: 0px; text-rendering: optimizelegibility;">
Prerequisites</h2>
<div class="sectionbody" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="paragraph" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; margin-bottom: 1em; padding: 0px; text-rendering: optimizelegibility;">
You need a Kubernetes or OpenShift cluster (eg., minikube or minishift), into which you have installed Che. F<span style="font-size: 1em;">ollow the steps in</span><span style="font-size: 1em;"> </span><a href="https://www.blogger.com/che7-minishift-deployment.adoc" style="background: transparent; box-sizing: border-box; color: #4183c4; font-size: 1em; line-height: inherit; text-decoration-line: none;">this document</a><span style="font-size: 1em;"> </span><span style="font-size: 1em;">to deploy Che.</span></div>
</div>
<div class="paragraph" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; margin-bottom: 1em; padding: 0px; text-rendering: optimizelegibility;">
Steps below can then be done to deploy a custom devfile registry to your cluster, and use it with Che.</div>
</div>
</div>
</div>
<div class="sect1" style="border-top: 0px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: "helvetica neue", helvetica, helvetica, arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px;">
<h2 id="_procedure" style="background-color: white; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #325d72; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1.6em; line-height: 1.4; margin: 0.2em 0px 0.5em; padding: 0px;">
Procedure</h2>
<div class="sectionbody" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="olist arabic" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<ol class="arabic" style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; list-style-position: outside; margin: 0px 0px 1em 0.96667em; padding: 0px;">
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
Check out <a class="bare" href="https://github.com/eclipse/che-devfile-registry/" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">https://github.com/eclipse/che-devfile-registry/</a></div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">git clone https://github.com/eclipse/che-devfile-registry/
cd che-devfile-registry</span></code></pre>
</div>
</div>
</li>
<li style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
Make changes in the <code style="background-color: transparent; border-radius: 3px; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #666666; font-family: Monaco, "DejaVu Sans Mono", "Courier New", monospace; font-size: 0.86667em; letter-spacing: 0px; line-height: inherit; overflow-wrap: break-word; padding: 1px 5px;">devfiles/</code> folder to add new or remove existing devfile folders from the registry.</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
Build the image.</div>
<div class="admonitionblock note" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; margin: 0px; padding: 0px;">
<table style="background: none; border-spacing: 0px; border: 0px; box-sizing: border-box; margin-bottom: 1.33333em; width: 645px;"><tbody style="box-sizing: border-box;">
<tr style="box-sizing: border-box;"><td class="icon" style="box-sizing: border-box; color: #222222; direction: ltr; font-size: 0.8em; line-height: 1.4; margin: 0px; padding: 0.6em 0.66667em; text-align: center; width: 80px;"><span class="fa icon-note" style="box-sizing: border-box; cursor: default; display: inline-block; font-family: "fontawesome"; font-size: 2.5em; font-stretch: normal; line-height: 1; text-shadow: rgba(0 , 0 , 0 , 0.5) 1px 1px 2px;" title="Note"></span></td><td class="content" style="border-left: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #666666; direction: ltr; font-size: 0.8em; line-height: 1.4; margin: 0px; padding: 0.6em 1.33333em 0.6em 1.2em;"><div class="paragraph" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; padding: 0px; text-rendering: optimizelegibility;">
This example uses a personal quay repository and an arbitrary tag <code style="background-color: transparent; border-radius: 3px; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; font-family: Monaco, "DejaVu Sans Mono", "Courier New", monospace; font-size: 0.86667em; letter-spacing: 0px; line-height: inherit; overflow-wrap: break-word; padding: 1px 5px;">ubi8-2</code>, but you can use another image registry and path as needed.</div>
</div>
</td></tr>
</tbody></table>
</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">docker build . -f Dockerfile --no-cache \
-t quay.io/nickboldt/che-devfile-registry:ubi8-2</span></code></pre>
</div>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
Push it to quay (or your image registry of choice)</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">docker push quay.io/nickboldt/che-devfile-registry:ubi8-2</span></code></pre>
</div>
</div>
<div class="admonitionblock note" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<table style="background: none; border-spacing: 0px; border: 0px; box-sizing: border-box; margin-bottom: 1.33333em; width: 645px;"><tbody style="box-sizing: border-box;">
<tr style="box-sizing: border-box;"><td class="icon" style="box-sizing: border-box; color: #222222; direction: ltr; font-size: 0.8em; line-height: 1.4; margin: 0px; padding: 0.6em 0.66667em; text-align: center; width: 80px;"><span class="fa icon-note" style="box-sizing: border-box; cursor: default; display: inline-block; font-family: "fontawesome"; font-size: 2.5em; font-stretch: normal; line-height: 1; text-shadow: rgba(0 , 0 , 0 , 0.5) 1px 1px 2px;" title="Note"></span></td><td class="content" style="border-left: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #666666; direction: ltr; font-size: 0.8em; line-height: 1.4; margin: 0px; padding: 0.6em 1.33333em 0.6em 1.2em;"><div class="paragraph" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
Verify the image and tag you pushed are published, eg.,</div>
</div>
<div class="ulist" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 0.5em; padding: 0px;">
<ul style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; list-style-position: outside; list-style-type: none; margin: 0px 0px 0px 1.33333em; padding: 0px;">
<li style="background: url("../../img/themes/github/li-chevron.png?1459601949") 0px 0.4em no-repeat; box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px 0px 0px 0.7em;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
<a class="bare" href="https://quay.io/repository/nickboldt/che-devfile-registry?tab=tags" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">https://quay.io/repository/nickboldt/che-devfile-registry?tab=tags</a></div>
</li>
</ul>
</div>
<div class="paragraph" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
Verify the <strong style="box-sizing: border-box; line-height: inherit;">Repository Visibility</strong> is <strong style="box-sizing: border-box; line-height: inherit;">public</strong>, eg.,</div>
</div>
<div class="ulist" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 0.5em; padding: 0px;">
<ul style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; list-style-position: outside; list-style-type: none; margin: 0px 0px 0px 1.33333em; padding: 0px;">
<li style="background: url("../../img/themes/github/li-chevron.png?1459601949") 0px 0.4em no-repeat; box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px 0px 0px 0.7em;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
<a class="bare" href="https://quay.io/repository/nickboldt/che-devfile-registry?tab=settings" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">https://quay.io/repository/nickboldt/che-devfile-registry?tab=settings</a></div>
</li>
</ul>
</div>
</td></tr>
</tbody></table>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
Remove any existing <code style="background-color: transparent; border-radius: 3px; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #666666; font-family: Monaco, "DejaVu Sans Mono", "Courier New", monospace; font-size: 0.86667em; letter-spacing: 0px; line-height: inherit; overflow-wrap: break-word; padding: 1px 5px;">che-devfile-registry</code> deployments.</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">oc delete dc che-devfile-registry; \
oc delete svc che-devfile-registry; \
oc delete route che-devfile-registry; \
sleep 5s</span></code></pre>
</div>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
Deploy the new <code style="background-color: transparent; border-radius: 3px; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #666666; font-family: Monaco, "DejaVu Sans Mono", "Courier New", monospace; font-size: 0.86667em; letter-spacing: 0px; line-height: inherit; overflow-wrap: break-word; padding: 1px 5px;">che-devfile-registry</code>.</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">oc new-app -f deploy/openshift/che-devfile-registry.yaml \
-p PULL_POLICY="Always" \
-p IMAGE="quay.io/nickboldt/che-devfile-registry" \
-p IMAGE_TAG="ubi8-2"; \
sleep 5s</span></code></pre>
</div>
</div>
<div class="imageblock" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<a href="https://1.bp.blogspot.com/-qZojYfsU2AI/XR41PwLeqhI/AAAAAAAA6Bo/EWRkDaNfa60NgABpznnBE1LBBSNQDtWlQCLcBGAs/s1600/custom-devfile-deployment.png" imageanchor="1" style="font-size: 1em; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="320" data-original-width="743" height="275" src="https://1.bp.blogspot.com/-qZojYfsU2AI/XR41PwLeqhI/AAAAAAAA6Bo/EWRkDaNfa60NgABpznnBE1LBBSNQDtWlQCLcBGAs/s640/custom-devfile-deployment.png" width="640" /></a></div>
</li>
<li style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
You can browse the registry’s <code style="background-color: transparent; border-radius: 3px; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #666666; font-family: Monaco, "DejaVu Sans Mono", "Courier New", monospace; font-size: 0.86667em; letter-spacing: 0px; line-height: inherit; overflow-wrap: break-word; padding: 1px 5px;">devfiles/index.json</code> file to verify your new devfile is included.</div>
<div class="imageblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<a href="https://1.bp.blogspot.com/-LlpGEEija9A/XR41QQ1SpOI/AAAAAAAA6Bs/Bmmhtyz6S3Y5a5TR8tthQDAsrmYCn9VOACLcBGAs/s1600/custom-devfile-registry.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="613" data-original-width="641" height="382" src="https://1.bp.blogspot.com/-LlpGEEija9A/XR41QQ1SpOI/AAAAAAAA6Bs/Bmmhtyz6S3Y5a5TR8tthQDAsrmYCn9VOACLcBGAs/s400/custom-devfile-registry.png" width="400" /></a></div>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
Update your config map to point to the new registry.</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">oc set env dc/che CHE_WORKSPACE_DEVFILE__REGISTRY__URL=http://che-devfile-registry-che.192.168.99.112.nip.io/</span></code></pre>
</div>
</div>
<div class="imageblock" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<a href="https://1.bp.blogspot.com/-WyYrz4YNeTs/XR41P0yvcAI/AAAAAAAA6Bg/ovZ-btSmqOIUDa0-RXmsnQFWL5ncL6uGQCLcBGAs/s1600/custom-devfile-configmap.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="36" data-original-width="706" height="32" src="https://1.bp.blogspot.com/-WyYrz4YNeTs/XR41P0yvcAI/AAAAAAAA6Bg/ovZ-btSmqOIUDa0-RXmsnQFWL5ncL6uGQCLcBGAs/s640/custom-devfile-configmap.png" width="640" /></a></div>
</div>
</li>
<li style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; margin: 0px; padding: 0px;"><div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<span style="font-size: 1em;">Check your Che deployment to see if the changes are live by creating a new workspace from your devfile registry:</span></div>
</li>
</ol>
<div style="background-color: white; color: #222222;">
<a class="bare" href="http://che-che.192.168.99.112.nip.io/dashboard/#/create-workspace" style="background: transparent; box-sizing: border-box; color: #4183c4; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: inherit; text-decoration-line: none;"></a><br /></div>
<ul style="background-color: white; color: #222222;"><a class="bare" href="http://che-che.192.168.99.112.nip.io/dashboard/#/create-workspace" style="background: transparent; box-sizing: border-box; color: #4183c4; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: inherit; text-decoration-line: none;"></a>
<li><a class="bare" href="http://che-che.192.168.99.112.nip.io/dashboard/#/create-workspace" style="background: transparent; box-sizing: border-box; color: #4183c4; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: inherit; text-decoration-line: none;"></a><a class="bare" href="http://che-che.192.168.99.112.nip.io/dashboard/#/create-workspace" style="background: transparent; box-sizing: border-box; color: #4183c4; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: inherit; text-decoration-line: none;">http://che-che.192.168.99.112.nip.io/dashboard/#/create-workspace</a></li>
</ul>
<ol class="arabic" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; list-style-position: outside; margin: 0px 0px 1em 0.96667em; padding: 0px;"></ol>
<div style="background-color: white; color: #222222;">
<a href="https://1.bp.blogspot.com/-KSqqsID-GIs/XR41P_XJjJI/AAAAAAAA6Bk/QpcW39_6JAwltzoaCG2zUwfGMN51JlxigCLcBGAs/s1600/custom-devfile-list.png" imageanchor="1" style="background-color: initial; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="553" data-original-width="1376" height="160" src="https://1.bp.blogspot.com/-KSqqsID-GIs/XR41P_XJjJI/AAAAAAAA6Bk/QpcW39_6JAwltzoaCG2zUwfGMN51JlxigCLcBGAs/s400/custom-devfile-list.png" width="400" /></a></div>
</div>
</div>
</div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-54896216059380601272019-06-29T19:14:00.002-04:002019-06-29T19:26:22.527-04:00Discovering containers loaded by Che 7<div class="paragraph" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-family: "Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; margin-bottom: 1em; padding: 0px; text-rendering: optimizelegibility;">
Second in this series... more tips for Che 7 on Minishift.</div>
</div>
<div class="paragraph" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-family: "Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px;">
</div>
<h1 style="background-color: white; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-weight: 300; line-height: 1.4; margin: 0px 0px 1.25rem; padding: 1rem 0px 8px; text-rendering: optimizelegibility;">
Discovering containers loaded by Che 7</h1>
<div class="sect1" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-family: "Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px 0px 1.33333em;">
<h2 id="_prerequisites" style="border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #325d72; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1.6em; line-height: 1.4; margin: 0.2em 0px 0.5em; padding: 0px; text-rendering: optimizelegibility;">
Prerequisites</h2>
<div class="sectionbody" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="paragraph" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; margin-bottom: 1em; padding: 0px; text-rendering: optimizelegibility;">
You need a Kubernetes or OpenShift cluster (eg., minikube or minishift), into which you have <a href="http://divby0.blogspot.com/2019/06/deploying-che-7-to-minishift-with-chectl.html" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">installed Che</a>.</div>
</div>
<div class="paragraph" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; margin-bottom: 1em; padding: 0px; text-rendering: optimizelegibility;">
Follow the steps in <a href="http://divby0.blogspot.com/2019/06/deploying-che-7-to-minishift-with-chectl.html" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">this document</a> to deploy Che. Steps below can be done in parallel to collect a list of containers involved in deployment.</div>
</div>
</div>
</div>
<div class="sect1" style="border-top: 0px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: "helvetica neue", helvetica, helvetica, arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px;">
<h2 id="_procedure" style="background-color: white; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #325d72; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1.6em; line-height: 1.4; margin: 0.2em 0px 0.5em; padding: 0px;">
Procedure</h2>
<div class="sectionbody" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="olist arabic" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<ol class="arabic" style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; list-style-position: outside; margin: 0px 0px 1em 0.96667em; padding: 0px;">
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
Once you have started your cluster, you can watch events and see which images are pulled. Start this in a console window before deploying Che to your cluster.</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">oc project che
oc get po
oc get events -w | tee /tmp/minishift.log.txt</span></code></pre>
</div>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
Watch for lines containing the following lines to see what containers are pulled.</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">Successfully pulled image "..."
and
Container image "..." already present on machine</span></code></pre>
</div>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
For example, this should extract just a list of pulled containers, including any duplicate re-pulls:</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">cat /tmp/minishift.log.txt | \
egrep "Successfully pulled image|Container image" | \
sed -e 's#.*\(Successfully pulled image\|Container image\) "\(.\+\)\".*#\2#g'</span></code></pre>
</div>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
You can also look at the available images in the minishift docker context:</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">eval $(minishift docker-env)
docker images</span></code></pre>
</div>
</div>
</li>
<li style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
Next, using <a href="https://github.com/che-incubator/chectl/releases" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">chectl</a>, <a href="http://divby0.blogspot.com/2019/06/deploying-che-7-to-minishift-with-chectl.html" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">deploy Che to your cluster</a> and watch the events get logged.</div>
</li>
<li style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
You can also see container events at this URL:</div>
<div class="ulist" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 0.5em; padding: 0px;">
<ul style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; list-style-position: outside; list-style-type: none; margin: 0px 0px 0px 1.33333em; padding: 0px;">
<li style="background: url("../../img/themes/github/li-chevron.png?1459601949") 0px 0.4em no-repeat; box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px 0px 0px 0.7em;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
https://192.168.YOUR.IP:8443/console/project/che/browse/events</div>
</li>
</ul>
</div>
</li>
</ol>
</div>
</div>
</div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-74475164587154194142019-06-29T19:12:00.000-04:002019-07-25T16:38:10.099-04:00Deploying Che 7 to Minishift with chectl<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">With the Che 7 just around the corner, and the realisation that I miss writing, I've decided to resurrect this blog from the dead and start a series of Che 7 tips. </span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">First up, the handful of steps required to get Che 7 running on Minishift 1.34 (OKD 3.11).</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">----</span></div>
<h1 style="background-color: white; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-weight: 300; line-height: 1.4; margin: 0px 0px 1.25rem; padding: 1rem 0px 8px; text-rendering: optimizelegibility;">
Deploying Che 7 to Minishift with chectl</h1>
<div class="sect1" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px 0px 1.33333em;">
<h2 id="_prerequisites" style="background-color: white; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #325d72; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1.6em; line-height: 1.4; margin: 0.2em 0px 0.5em; padding: 0px;">
Prerequisites</h2>
<div class="sectionbody" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="paragraph" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-family: "helvetica neue", helvetica, helvetica, arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; margin-bottom: 1em; padding: 0px; text-rendering: optimizelegibility;">
You need the latest <a href="https://github.com/minishift/minishift/releases" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">Minishift</a> and <a href="https://github.com/che-incubator/chectl/releases" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">chectl</a> releases.</div>
</div>
<div class="paragraph" style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-family: "helvetica neue", helvetica, helvetica, arial, sans-serif; font-size: 15px; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; margin-bottom: 1em; padding: 0px; text-rendering: optimizelegibility;">
Fetch them like this (or similar):</div>
</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em;"><code style="box-sizing: border-box; display: block; line-height: inherit;"><span style="background-color: white;"><span style="font-family: monaco, dejavu sans mono, courier new, monospace;"><span style="white-space: pre-wrap;">cd ~/bin
</span><span style="font-size: 16px; white-space: pre-wrap;">curl -sSL https://github.com/che-incubator/chectl/releases/download/20190724230954/chectl-linux -o chectl
</span><span style="white-space: pre-wrap;">chmod +x chectl</span></span></span></code></pre>
</div>
</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; font-family: "helvetica neue", helvetica, helvetica, arial, sans-serif; font-size: 15px; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">cd /tmp
curl -sSL https://github.com/minishift/minishift/releases/download/v1.34.1/minishift-1.34.1-linux-amd64.tgz -o minishift.tgz
tar xvzf minishift.tgz
mv minishift*/minishift ~/bin/
chmod +x ~/bin/minishift</span></code></pre>
</div>
</div>
</div>
</div>
<div class="sect1" style="border-top: 0px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-size: 15px; margin: 0px; padding: 0px;">
<h2 id="_procedure" style="background-color: white; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #325d72; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1.6em; line-height: 1.4; margin: 0.2em 0px 0.5em; padding: 0px;">
Procedure</h2>
<div class="sectionbody" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<div class="olist arabic" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<ol class="arabic" style="box-sizing: border-box; direction: ltr; font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 1em; line-height: 1.4; list-style-position: outside; margin: 0px 0px 1em 0.96667em; padding: 0px;">
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
Start up minishift. (See <a href="https://divby0.blogspot.com/2019/07/configuring-minishift-for-use-with.html">Start up Minishift</a> for some suggested default settings.)</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">minishift start</span></code></pre>
</div>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
Log in once startup is complete. NOTE: you need cluster admin priviledges.</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">oc login 192.168.MY.IP:8433 -u system -p admin</span></code></pre>
</div>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
To watch the events and see which images are pulled, see <a href="http://divby0.blogspot.com/2019/06/discovering-containers-loaded-by-che-7.html" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">this document</a>.</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px;">
Deploy Che to minishift using the operator:</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">chectl server:start -a operator -p minishift -n che</span></code></pre>
</div>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
If using Fix the plugin registry URL to use the latest version:</div>
<div class="listingblock" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 1.33333em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 3px; border: 2px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-family: consolas, "liberation mono", courier, monospace; font-size: 1.06667em; line-height: 1.6; overflow-wrap: break-word; overflow-x: auto; padding: 0.66667em; white-space: pre-wrap;"><code style="box-sizing: border-box; display: block; font-family: monaco, "dejavu sans mono", "courier new", monospace; font-size: inherit; line-height: inherit;"><span style="background-color: white;">oc set env dc/che CHE_WORKSPACE_PLUGIN__REGISTRY__URL=https://che-plugin-registry.openshift.io/v3</span></code></pre>
</div>
</div>
<div class="admonitionblock note" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;">
<table style="background: none; border-spacing: 0px; border: 0px; box-sizing: border-box; margin-bottom: 1.33333em; width: 645px;"><tbody style="box-sizing: border-box;">
<tr style="box-sizing: border-box;"><td class="icon" style="box-sizing: border-box; color: #222222; direction: ltr; font-size: 0.8em; line-height: 1.4; margin: 0px; padding: 0.6em 0.66667em; text-align: center; width: 80px;"><span class="fa icon-note" style="box-sizing: border-box; cursor: default; display: inline-block; font-family: "fontawesome"; font-size: 2.5em; font-stretch: normal; line-height: 1; text-shadow: rgba(0 , 0 , 0 , 0.5) 1px 1px 2px;" title="Note"></span></td><td class="content" style="border-left: 1px solid rgb(221, 221, 221); box-sizing: border-box; direction: ltr; font-size: 0.8em; line-height: 1.4; margin: 0px; padding: 0.6em 1.33333em 0.6em 1.2em;"><div class="paragraph" style="box-sizing: border-box; color: #666666; direction: ltr; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
<div class="paragraph data-line-50" style="background-color: white; box-sizing: border-box; color: rgba(0, 0, 0, 0.6); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 17px; letter-spacing: -0.17px; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
You can also use the <code style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.9375em; letter-spacing: 0px; line-height: 1.45; overflow-wrap: break-word; padding: 0.1em 0.5ex; text-rendering: optimizespeed; word-spacing: -0.15em;">-a minishift-addon</code> approach to deploy che, which uses a deployment configuration instead of an operator. However, this approach is <strong style="box-sizing: border-box; letter-spacing: -0.005em; line-height: inherit;">deprecated</strong> as it does not support using a <a href="vscode-resource:/home/nboldt/5-Che/1.github_upstream__manual-sync_to_pkgs.devel/codeready-workspaces/devdoc/building/che7-custom-images-cr.adoc" style="background: none; box-sizing: border-box; color: #2156a5; line-height: inherit;" title="che7-custom-images-cr.adoc">custom resource</a> (eg., for air gap deployments).</div>
</div>
<div class="paragraph data-line-52" style="background-color: white; box-sizing: border-box; color: rgba(0, 0, 0, 0.6); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 17px; letter-spacing: -0.17px; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
Also, if using Minishift 1.34.0 or earlier with the <code style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.9375em; letter-spacing: 0px; line-height: 1.45; overflow-wrap: break-word; padding: 0.1em 0.5ex; text-rendering: optimizespeed; word-spacing: -0.15em;">minishift-addon</code>, you must fix the plugin registry URL to use the latest version:</div>
</div>
<div class="listingblock data-line-54" style="background-color: white; box-sizing: border-box; color: rgba(0, 0, 0, 0.6); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 17px; letter-spacing: -0.17px; margin: 0px 0px 1.25em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); direction: ltr; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.8125em; line-height: 1.45; overflow-wrap: break-word; overflow-x: auto; padding: 1em; text-rendering: optimizespeed; white-space: pre-wrap;"><code style="box-sizing: border-box; color: inherit; display: block; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: inherit; line-height: inherit;">oc set env dc/che CHE_WORKSPACE_PLUGIN__REGISTRY__URL=https://che-plugin-registry.openshift.io/v3</code></pre>
</div>
</div>
<div class="paragraph data-line-58" style="background-color: white; box-sizing: border-box; color: rgba(0, 0, 0, 0.6); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 17px; letter-spacing: -0.17px; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
You can open the console for the che <code style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.9375em; letter-spacing: 0px; line-height: 1.45; overflow-wrap: break-word; padding: 0.1em 0.5ex; text-rendering: optimizespeed; word-spacing: -0.15em;">minishift-addon</code>deployment to verify your change has been applied:</div>
</div>
<div class="ulist data-line-60" style="background-color: white; box-sizing: border-box; color: rgba(0, 0, 0, 0.6); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 17px; letter-spacing: -0.17px; margin: 0px 0px 0.625em; padding: 0px;">
<ul style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1em; line-height: 1.6; list-style-position: outside; margin: 0px 0px 0px 1.25em; padding: 0px;">
<li class="data-line-60" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
<a class="bare" href="https://192.168.your.ip:8443/console/project/che/edit/dc/che" style="background: none; box-sizing: border-box; color: #2156a5; line-height: inherit;" title="https://192.168.YOUR.IP:8443/console/project/che/edit/dc/che">https://192.168.YOUR.IP:8443/console/project/che/edit/dc/che</a></div>
</li>
</ul>
</div>
<div class="paragraph data-line-62" style="background-color: white; box-sizing: border-box; color: rgba(0, 0, 0, 0.6); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 17px; letter-spacing: -0.17px; margin: 0px; padding: 0px;">
<div style="box-sizing: border-box; direction: ltr; font-family: inherit; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.6; margin-bottom: 0.625em; padding: 0px; text-rendering: optimizelegibility;">
You should see:</div>
</div>
<div class="listingblock data-line-64" style="background-color: white; box-sizing: border-box; color: rgba(0, 0, 0, 0.6); direction: ltr; font-family: "Noto Serif", "DejaVu Serif", serif; font-size: 17px; letter-spacing: -0.17px; margin: 0px 0px 1.25em; padding: 0px;">
<div class="content" style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px; position: relative;">
<pre class="highlight" style="background: rgb(247, 247, 248); border-radius: 4px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); direction: ltr; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: 0.8125em; line-height: 1.45; overflow-wrap: break-word; overflow-x: auto; padding: 1em; text-rendering: optimizespeed; white-space: pre-wrap;"><code style="box-sizing: border-box; color: inherit; display: block; font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace; font-size: inherit; line-height: inherit;">CHE_WORKSPACE_PLUGIN__REGISTRY__URL = https://che-plugin-registry.openshift.io/v3</code></pre>
</div>
</div>
</div>
</div>
</td></tr>
</tbody></table>
</div>
</li>
<li style="box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
Wait for redeployment to complete.</div>
</li>
<li style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
Once running, you can see your Che instance here:</div>
<div class="ulist" style="box-sizing: border-box; direction: ltr; margin: 0px 0px 0.5em; padding: 0px;">
<ul style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; list-style-position: outside; list-style-type: none; margin: 0px 0px 0px 1.33333em; padding: 0px;">
<li style="background: url("../../img/themes/github/li-chevron.png?1459601949") 0px 0.4em no-repeat; box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px 0px 0px 0.7em;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
http://che-che.192.168.YOUR.IP.nip.io/</div>
</li>
</ul>
</div>
</li>
<li style="background-color: white; box-sizing: border-box; color: #222222; direction: ltr; margin: 0px; padding: 0px;"><div style="box-sizing: border-box; direction: ltr; font-size: 1em; line-height: 1.4; margin-bottom: 0.5em; padding: 0px; text-rendering: optimizelegibility;">
If you then add a new workspace, you can see even more images pulled in the openshift <a href="http://divby0.blogspot.com/2019/06/discovering-containers-loaded-by-che-7.html" style="background: transparent; box-sizing: border-box; color: #4183c4; line-height: inherit; text-decoration-line: none;">event log</a>.</div>
</li>
</ol>
</div>
</div>
</div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-1070436892949184792017-02-24T12:56:00.002-05:002017-02-24T14:58:17.287-05:00Streamline Nexus releases with nexus-staging-maven-plugin<div style="text-align: left;">
For years, I've had a many-step process for releasing Maven artifacts to the JBoss Nexus, which has made me reticent to do frequent releases due to the <b>heavily manual process</b>.</div>
<div style="text-align: left;">
</div>
<ol>
<li>Commit a change to the artifact's pom, replacing version x.y.z-SNAPSHOT with x.y.z</li>
<li>Build the artifact in Jenkins (often triggered automatically via Github hooks) and deploy it to staging Nexus instance using server credentials in Jenkins</li>
<li>Log into Nexus</li>
<li>Browse for the Staging repos</li>
<li>Sort the list by most recently updated</li>
<li>Look for the "Implicitly created (auto staging)." entries</li>
<li>For each entry, select the Content tab and drill down to see if that entry is the correct one (could be another job or person's staging bits)</li>
<li>If the entry is correct, click the Close button and enter a description; if not, check the next one in the list until you find the correct one</li>
<li>Click Refresh button</li>
<li>Click the Release button</li>
<li>Browse Nexus to verify the artifact is deployed</li>
</ol>
<div>
<b><br /></b>
<b>But no more! </b></div>
<div>
<br /></div>
<div>
With the <a href="https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin" target="_blank">nexus-staging-maven-plugin</a>, I can simplify that process by adding more Maven steps the job.</div>
<div>
</div>
<ol>
<li>Commit a change to the artifact's pom, replacing version x.y.z-SNAPSHOT with x.y.z</li>
<li>Build the artifact in Jenkins (often triggered automatically via Github hooks) and deploy it to production Nexus instance using server credentials in Jenkins</li>
<li>Browse Nexus to verify the artifact is deployed</li>
</ol>
<div>
<br /></div>
<div>
<b>So, how do you enable this?</b></div>
<div>
<br /></div>
<div>
<ul>
<li>Ensure you have all the <a href="https://github.com/jbosstools/jbosstools-build/commit/1076708e273c81c6c12fe79a8c5434a103169c85?w=1" target="_blank">correct metadata configured</a> in your pom: description, URL, license, developers, SCM, issueManagement, etc. </li>
</ul>
<ul>
<li>Add <a href="https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin#maven3-only" target="_blank">nexus-staging-maven-plugin</a> to your pom</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-RE7Ib_niryc/WLByy6WtbtI/AAAAAAAAfSg/VYB0NI2TFw8vqA12BRVji_RnsCSmdNqzACLcB/s1600/pom-add-staging-plugin.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="139" src="https://1.bp.blogspot.com/-RE7Ib_niryc/WLByy6WtbtI/AAAAAAAAfSg/VYB0NI2TFw8vqA12BRVji_RnsCSmdNqzACLcB/s320/pom-add-staging-plugin.png" width="320" /></a></div>
<div>
<br /></div>
<ul>
<li>Perform three steps in Jenkins</li>
</ul>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-Yxm45aqW2kg/WLBzOgGvmtI/AAAAAAAAfSk/evngaAKYejgd-QyxfXf5cpo27weke1h_wCLcB/s1600/nexus-3-step-config-in-jenkins.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://1.bp.blogspot.com/-Yxm45aqW2kg/WLBzOgGvmtI/AAAAAAAAfSk/evngaAKYejgd-QyxfXf5cpo27weke1h_wCLcB/s320/nexus-3-step-config-in-jenkins.png" width="286" /></a></div>
<div>
<br /></div>
</div>
<div>
That's it!</div>
<div>
<br /></div>
<div>
Or, to enable this selectively for only releases (but not SNAPSHOTS):<br />
<br />
<pre>pom=${WORKSPACE}/path/to/pom.xml
pomVersion=$(grep "" ${pom} | head -1 | sed -e "s#.*\(.\+\).*#\1#")
MVN="/path/to/maven3/bin/mvn -Dmaven.repo.local=${WORKSPACE}/.repository/"
if [[ ${pomVersion} == *"-SNAPSHOT" ]]; then
${MVN} deploy
else
${MVN} clean deploy -DskipRemoteStaging=true -f ${pom} \
-DstagingDescription="[${JOB_NAME} ${BUILD_TIMESTAMP} ${BUILD_NUMBER}] :: ${pomVersion} :: deploy to local"
${MVN} nexus-staging:deploy-staged -f ${pom} \
-DstagingDescription="[${JOB_NAME} ${BUILD_TIMESTAMP} ${BUILD_NUMBER}] :: ${pomVersion} :: deploy to stage + close"
${MVN} nexus-staging:release -f ${pom} \
-DstagingDescription="[${JOB_NAME} ${BUILD_TIMESTAMP} ${BUILD_NUMBER}] :: ${pomVersion} :: release"
fi
</pre>
</div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-12818033414943772052016-11-01T21:02:00.002-04:002016-11-01T21:06:30.254-04:00Kiva Loans - Eight Years Of Changing Lives<div style="text-align: left;">
As it's November and I haven't blogged in ages, and it's been three years since my last foray into writing a <a href="http://nanowrimo.org/participants/nickboldt" target="_blank">NaNoWriMo</a>, I decided that it's high time I start blogging again. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, to start things off gently, here's a quick recap of the loans I've given to <a href="https://www.kiva.org/invitedby/nickboldt" target="_blank">Kiva.org</a>, and through them have helped dozens of people to change their lives, $25 at a time.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Checking my stats, I see I have loaned over $3000 since I started giving to <a href="https://www.kiva.org/invitedby/nickboldt" target="_blank">Kiva</a> in 2008. </div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.kiva.org/teams"><img border="0" height="161" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxcomKrpnV0q7uKaynpT8Qxb_jHJ0vwnEo69b3z1yi3nKHSYhp_PME4SSHARSSSYP5J7jtiRZ729YqNDI7GfY6CZeEYgZaz0lNIntU5zBE4IUB8TllMsYjh8fhyphenhyphenoE5mJgNz9nvFQ/s320/kiva-stats-nov01-2016.png" width="320" /></a></div>
<br />
Only 4 sectors have been so far omitted - honestly, I'm not sure that Personal Use and Entertainment should really be reasons for asking for a loan, but hey.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-ebLeLDbY_UQ/WBk4lg8BPqI/AAAAAAAAe6o/cZ5Gm0VjTPcP1xgD1wD1_rp2VCa6GAuuACLcB/s1600/kiva-stats3-nov01-2016.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="194" src="https://3.bp.blogspot.com/-ebLeLDbY_UQ/WBk4lg8BPqI/AAAAAAAAe6o/cZ5Gm0VjTPcP1xgD1wD1_rp2VCa6GAuuACLcB/s320/kiva-stats3-nov01-2016.png" width="320" /></a></div>
<br />
Though one or two were not fully funded and were therefore returned, I've made over 100 loans to 33 countries - nearly half of those supported by microfinance lenders and <a href="https://www.kiva.org/invitedby/nickboldt" target="_blank">Kiva</a>. (I'm not sure which country was included in the first list, but not the second. Maybe that's what happens when countries change names, or are annexed?)<br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-MWy2dfPjuwM/WBk4lV5l3SI/AAAAAAAAe6c/7GV0PhUt_t8Io34_6A_Pj07sRiQhDTk5gCLcB/s1600/kiva-stats2-nov01-2016.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="135" src="https://2.bp.blogspot.com/-MWy2dfPjuwM/WBk4lV5l3SI/AAAAAAAAe6c/7GV0PhUt_t8Io34_6A_Pj07sRiQhDTk5gCLcB/s320/kiva-stats2-nov01-2016.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-Ele14tngx2E/WBk4lh2B7PI/AAAAAAAAe6s/1XoFXvo4TmIsVYGQfidNUwusMimWzvN_ACLcB/s1600/kiva-stats4-nov01-2016.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://4.bp.blogspot.com/-Ele14tngx2E/WBk4lh2B7PI/AAAAAAAAe6s/1XoFXvo4TmIsVYGQfidNUwusMimWzvN_ACLcB/s320/kiva-stats4-nov01-2016.png" width="320" /></a></div>
<br />
Still have a long way to go to collect all the Activities achievements - nearly one third complete. Challenge accepted!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-JzbmIkMdfh4/WBk4lgUP25I/AAAAAAAAe6w/kf3_I9W6BE4t-5FUh2mA3dAOLyK_DByKACLcB/s1600/kiva-stats5-nov01-2016.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://1.bp.blogspot.com/-JzbmIkMdfh4/WBk4lgUP25I/AAAAAAAAe6w/kf3_I9W6BE4t-5FUh2mA3dAOLyK_DByKACLcB/s320/kiva-stats5-nov01-2016.png" width="217" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
If you'd like to play this game - a game that changes lives for the better - you can too. Click below to start lending today.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.kiva.org/invitedby/nickboldt" target="_blank"><img border="0" src="https://1.bp.blogspot.com/-ZHK5i3hZrvc/WBk4llUSYSI/AAAAAAAAe6k/xvT5GozNK70OpYrnRoYaJPyU3ZF1nX2kwCLcB/s1600/kiva-loans-change-lives-150x150.gif" /></a></div>
<br />
<div style="text-align: left;">
<br /></div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-60983431597002343092016-03-26T19:41:00.003-04:002016-05-09T20:10:10.808-04:00Cast media from Windows netbook to Android tv box<div style="text-align: left;">
Finally figured out a simple way to cast media from my netbook to my TV box. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
On the Android box:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
1. Install AirPlay/DLNA Receiver (LITE or PRO) from https://play.google.com/store/apps/details?id=com.waxrain.airplayer&hl=en</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
2. Launch the app. Turn on <b>DLNA DMR</b> then set a device nickname. Apparently also works with <b>AirPlay </b>and <b>AirTunes </b>if you want to stream from an iPad/iPhone. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
On the Windows box:</div>
<div style="text-align: left;">
<br /></div>
1. Enable media sharing in Windows 10 from Control Panel\Network and Internet\Network and Sharing Center\Media streaming options (requires admin access).<br />
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQkb0d9XswxnkjO1KCeya3qy_gqaa0BF4EfbgItGoNk-3lPMGg656apIYGIqmlLv1wuyp3n5vIWNlYz0J3p82Ic-l-FQDDG-AdBb-7EUJAnXUxtKnETOAk6t_6VO4jgXaGyY9PmA/s1600/media-settings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQkb0d9XswxnkjO1KCeya3qy_gqaa0BF4EfbgItGoNk-3lPMGg656apIYGIqmlLv1wuyp3n5vIWNlYz0J3p82Ic-l-FQDDG-AdBb-7EUJAnXUxtKnETOAk6t_6VO4jgXaGyY9PmA/s320/media-settings.png" width="320" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
2. Install http://download.waxrain.com/AirPinPcSender/AirPinPcSetup.exe to send media from Windows to receiver.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
3. Browse for media file on Windows machine; right-click and select Cast To Device or DLNA Play to > [your android device].</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
That's it!</div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-23741202053298426202016-01-18T18:39:00.000-05:002016-01-18T18:39:12.631-05:00Jelly Bean Keyboard - Cursor KeysEver wanted to add cursor movement keys to your text messaging experience?
The <a href="https://play.google.com/store/apps/details?id=com.jlsoft.inputmethod.latin.jbk43.free&hl=en">Jelly Bean Keyboard</a> includes this option, but it's somewhat hidden. Here's how to find and enable it.<br />
<br />
First, download the app from the Google Play Store: <a href="https://play.google.com/store/apps/details?id=com.jlsoft.inputmethod.latin.jbk43.free&hl=en">https://play.google.com/store/apps/details?id=com.jlsoft.inputmethod.latin.jbk43.free&hl=en</a><br />
<br />
Next, go into the settings applet, then find "Languages and input".<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-7ab21Fr1L1k/Vp109C5nb1I/AAAAAAAAYrQ/O658--05sc8/s1600/Screenshot_2016-01-18-18-16-40.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-7ab21Fr1L1k/Vp109C5nb1I/AAAAAAAAYrQ/O658--05sc8/s320/Screenshot_2016-01-18-18-16-40.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Now look for Jelly Bean Keyboard 4.3 you installed earlier from the Play Store, and tap the gear icon next to that to enter settings for the keyboard.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-NR6ZRTBVYlA/Vp109DOU82I/AAAAAAAAYrM/S7trPdfs1rQ/s1600/Screenshot_2016-01-18-18-16-33.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-NR6ZRTBVYlA/Vp109DOU82I/AAAAAAAAYrM/S7trPdfs1rQ/s320/Screenshot_2016-01-18-18-16-33.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Here's the confusing / hidden setting part. Across the top, there's a "Standard Settings" bar, and under that is stuff like Auto-capitalization, Vibrate on keypress, Sound on keypress.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
To the RIGHT of "Standard Settings" is a "JBK 4.3 settings" item, which you can access by swiping from the right to the left.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-7Q7Fu7fyrpw/Vp108mkfN_I/AAAAAAAAYrA/C8tENmFvOKk/s1600/Screenshot_2016-01-18-18-16-26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-7Q7Fu7fyrpw/Vp108mkfN_I/AAAAAAAAYrA/C8tENmFvOKk/s320/Screenshot_2016-01-18-18-16-26.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-onGPxqKQDnU/Vp108jR68lI/AAAAAAAAYrE/R5zELuLc82Y/s1600/Screenshot_2016-01-18-18-16-21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-onGPxqKQDnU/Vp108jR68lI/AAAAAAAAYrE/R5zELuLc82Y/s320/Screenshot_2016-01-18-18-16-21.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both;">
Now scroll down until you see "Key layouts". Below that are options for keyboard layouts when you're in landscape or portrait orientation. Next is an option for "Show arrows" which you can set to Never, Portrait, Landscape, or Both.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-zF4f6I2mERA/Vp108jhvzKI/AAAAAAAAYrI/qnMgbA5_lQk/s1600/Screenshot_2016-01-18-18-16-15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-zF4f6I2mERA/Vp108jhvzKI/AAAAAAAAYrI/qnMgbA5_lQk/s320/Screenshot_2016-01-18-18-16-15.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The result? This:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-G_cjDe4iiJM/Vp125Umyd0I/AAAAAAAAYrs/9jlVHxpIL04/s1600/Screenshot_2016-01-18-18-34-23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-G_cjDe4iiJM/Vp125Umyd0I/AAAAAAAAYrs/9jlVHxpIL04/s320/Screenshot_2016-01-18-18-34-23.png" width="180" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-32693906631748278082016-01-01T14:17:00.000-05:002016-01-01T14:17:23.865-05:00New Year's Day<div align="center">
</div>
Been too long since I blogged here. Time to begin again.
<blockquote>
<i></i>
<pre><i>All is white on New Year's Day
Like a dead channel, on the TV
I want to be coding
Be coding night and day
The more things change
The more they stay the same
I will iterate again
I will iterate again
Under a neon bulb
Group of devs chatter, in @s and pings
Bugzillas logged, JIRAs are too
The blogosphere says, says
Say it's true, it's true...
And we can break through
Though platforms too
Many spring from one
I... I will write some tests again
I... I will write some tests again
Oh...
Maybe the time is right
Oh... maybe tonight...
I'll debug my tests again
I'll debug my tests again
And so we're told it's the container age
Transform and deliver your apps a new way
Still I want to be coding
Be coding night and day
The more things change
The more they stay the same</i></pre>
</blockquote>
<div align="right">
<small><a href="https://www.youtube.com/watch?v=SlDi4hpJsaY"> U2</a> - <a href="http://www.azlyrics.com/lyrics/u2/newyearsday.html"> New Year's Day</a></small></div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-15724433285358387552014-12-11T13:02:00.001-05:002014-12-11T13:19:42.412-05:00A Day In The LifeCan't believe it's been a full two years since I last posted to this blog. Time flies when you're making change.<br />
<br />
<div align="center">
<br />
<a href="http://fc06.deviantart.net/fs38/f/2008/347/f/d/A_Day_in_The_Life_by_Lazarus_6130.jpg"><img src="http://fc06.deviantart.net/fs38/f/2008/347/f/d/A_Day_in_The_Life_by_Lazarus_6130.jpg" width="240" /></a><br />
<small><i> via <a href="http://www.deviantart.com/art/A-Day-in-The-Life-106175305">Lazarus-6130</a> at <a href="http://www.deviantart.com/browse/all/">DeviantArt</a></i></small> </div>
<br />
<blockquote>
<i> I read the blogs today oh boy <br />
About more <a href="http://leftoversalad.tumblr.com/post/103503118002">JS</a> frameworks on their way<br />
And though the news was rather sad<br />
Well I just had to laugh<br />
I saw the <a href="http://www.webappers.com/infographics/javascript-frameworks-jquery.html">infograph</a><br />
<br />
It was yet another approach<br />
To solving the same things of yesterday<br />
A crowd of people stood and trolled<br />
They'd seen this stuff before<br />
Nobody was really sure <br />
If it was like IO or Node<br />
<br />
I saw a tweet today oh boy<br />
<a href="http://www.thestar.com/news/gta/2014/12/09/how_to_really_speed_up_the_504_streetcar.html">Toronto street car service is still slow</a><br />
They've crowds of people every day<br />
But I still have to drive<br />
Cuz of where I live<br />
I'd love more subways here<br />
<br />
Woke up, fell outta bed<br />
A Beatles earworm in my head<br />
Found my way down th'hall and dialed my call<br />
And sitting there I noticed sound was dead<br />
<br />
Found my phone in seconds flat<br />
Bluejeans worked, so that was that<br />
Found my way online (had to reboot)<br />
And somebody spoke and I went into a dream<br />
<br />
I read the logs today oh boy<br />
<a href="https://www.openhub.net/p/11081">Thousands of commits by hundreds of folks</a><br />
Though some issues were rather small<br />
We had to <a href="https://jira.jboss.org/jira/browse/JBIDE">count</a> them <a href="https://jira.jboss.org/jira/browse/JBDS">all</a><br />
Now we know how many tweaks it takes to make <a href="http://www.jboss.org/products/devstudio/overview/">a new release</a><br />
And <a href="http://tools.jboss.org/documentation/howto/">how to</a> turn it on<br />
<br />
</i></blockquote>
<div align="right">
<small><a href="https://www.youtube.com/watch?v=P-Q9D4dcYng"> The Beatles </a> - <a href="http://www.azlyrics.com/lyrics/beatles/adayinthelife.html"> A Day In The Life </a></small></div>
nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-54160304128346318282012-12-07T19:07:00.001-05:002014-12-11T13:20:17.041-05:00The JBoss Developers' SongHey! Guess what?<br />
<br />
<a href="http://www.jboss.org/tools">JBoss Tools 4.0</a> and <a href="https://devstudio.jboss.com/">JBoss Developer Studio 6.0</a> are available today. So... a quick tune in tribute to all the hard-working people who made it happen.<br />
<br />
<div align="center">
<blockquote>
<i>Who squashes <a href="https://issues.jboss.org/browse/JBIDE">bugs users have found</a>?</i><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://issues.jboss.org/browse/JBIDE" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-snbAe1cqQXw/UMGCjhz9RtI/AAAAAAAAG6E/ldSqZeALvS4/s320/jbide-stats.png" height="232" width="320" /></a></div>
<i>Who keeps the <a href="https://issues.jboss.org/browse/JBDS">unresolved count</a> down?</i><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://issues.jboss.org/browse/JBDS" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-bynO5gPJQAA/UMGCwazRYRI/AAAAAAAAG6Q/PoHL1I6XN6M/s320/jbds-stats.png" height="232" width="320" /></a></div>
<i>We do! We do!<br />
<br />
Who answers to the Will of <a href="https://github.com/maxandersen/">Max</a>?<br />
</i><br />
<div class="separator" style="clear: both; text-align: center;">
<i><a href="http://1.bp.blogspot.com/--5Omu5h9-Dw/UMGDkZ-EZII/AAAAAAAAG6c/7EHnUl8GdeA/s1600/the-will.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/--5Omu5h9-Dw/UMGDkZ-EZII/AAAAAAAAG6c/7EHnUl8GdeA/s320/the-will.png" height="197" width="320" /></a></i></div>
<i>Who deals with all of the <a href="http://www.urbandictionary.com/define.php?term=pebcak">PEBCAK</a>s?<br />
</i><br />
<div class="separator" style="clear: both; text-align: center;">
<i><a href="http://3.bp.blogspot.com/-R4_sIfxnG2I/UMGDqnZRIxI/AAAAAAAAG6o/5I_X7FM-y08/s1600/pebcak.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-R4_sIfxnG2I/UMGDqnZRIxI/AAAAAAAAG6o/5I_X7FM-y08/s320/pebcak.png" height="219" width="320" /></a></i></div>
<i>We do! We do!<br />
<br />
Who closed/resolved <a href="https://issues.jboss.org/issues/?jql=%28project%20in%20%28JBDS%29%20AND%20fixVersion%20in%20%28%226.0.0.GA%22%2C%20%226.0.0.CR1%22%2C%20%226.0.0.Beta2%22%2C%20%226.0.0.Beta1%22%2C%20%226.0.0.Alpha1%22%2C%20%226.0.0.Alpha2%22%29%20OR%20project%20in%20%28JBIDE%2C%20TOOLSDOC%29%20AND%20fixVersion%20in%20%28%224.0.0.Final%22%2C%20%224.0.0.CR1%22%2C%20%224.0.0.Beta2%22%2C%20%224.0.0.Beta1%22%2C%20%224.0.0.Alpha1%22%2C%20%224.0.0.Alpha2%22%29%29%20AND%20resolution%20not%20in%20%28Unresolved%29%20ORDER%20BY%20fixVersion%20ASC">a thousand bugs</a>?<br />
</i><br />
<div class="separator" style="clear: both; text-align: center;">
<i><a href="http://nces.ed.gov/nceskids/createagraph/default.aspx" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-OmVva3EsUhw/UMGIjnmXw9I/AAAAAAAAG68/qGWtBqkbg-A/s320/chart.png" height="247" width="320" /></a></i></div>
<i>Who attends all of those <a href="http://www.jboss.org/usergroups">JBUG</a>s?<br />
</i><br />
<div class="separator" style="clear: both; text-align: center;">
<i><a href="http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=116568305051594027272.0004568a0181779ee1738&ll=24.527135,3.867188&spn=109.636453,309.375&z=2&source=embed" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-qQLmmJuf4NM/UMF85ZjmD9I/AAAAAAAAG5A/G3xTStdzkD4/s320/map.png" height="146" width="320" /></a></i></div>
<i>We do! We do!<br />
<br />
Who fills <a href="http://docs.jboss.org/tools/movies/">more roles than Tom Hanks</a>?<br />
</i><br />
<div class="separator" style="clear: both; text-align: center;">
<i><a href="https://devstudio.jboss.com/updates/6.0/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-JpDPAIj_GHE/UMF_RCaaCwI/AAAAAAAAG5k/_ORkLmsJNTU/s320/jbds-screenshot-browsersim.png" height="217" width="320" /></a></i></div>
<i>Who gets <a href="http://marketplace.eclipse.org/metrics/successful_installs">the top Marketplace ranks</a>? <a href="http://www.blogger.com/blogger.g?blogID=17823979#note"><sup>1</sup></a><br />
</i><br />
<div class="separator" style="clear: both; text-align: center;">
<i><a href="http://marketplace.eclipse.org/metrics/successful_installs" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-onuXHjIk90E/UMF9geP66sI/AAAAAAAAG5M/si6X5pJkE_Q/s320/marketplace-installs.png" height="320" width="274" /></a></i></div>
<i>We do! We do!<br />
</i></blockquote>
<br />
<div align="right">
<small><a href="http://www.youtube.com/watch?v=_ZI_aEalijE"> The Simpsons </a> - <a href="http://www.youtube.com/watch?v=_ZI_aEalijE"> The Stonecutters' Song </a></small></div>
</div>
<br />
<a href="http://www.blogger.com/blogger.g?blogID=17823979" name="note"></a><small><sup>1</sup> - As of 2012/12/07, <a href="https://marketplace.eclipse.org/node/420896">JBoss Tools</a> + <a href="https://marketplace.eclipse.org/node/503834">JBoss Developer Studio</a> successful Eclipse Marketplace installs for <a href="https://marketplace.eclipse.org/content/jboss-tools-1">Helios</a>, <a href="https://marketplace.eclipse.org/content/jboss-tools-indigo">Indigo</a>, and <a href="https://marketplace.eclipse.org/node/420896">Juno</a> total over 141,000. SpringIDE and Spring Tool Suite installs total over 163,000. This puts us #5 behind only Maven, Subclipse, Subversive, and Spring.</small>nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-87415280753580709482012-06-19T16:28:00.007-04:002012-06-19T16:34:49.468-04:00Open Source is Painless (Theme from JBDS)<p>With <a href="https://devstudio.jboss.com/earlyaccess/">JBDS 5.0.0.CR1</a> and <a href="http://www.jboss.org/tools/download/dev">JBoss Tools 3.3.0.CR1</a> out, and GA/Final releases just around the corner, it's high time for a new song.
<p><a href="http://www.youtube.com/watch?v=2Kjh9lQXLWk">Hell's bells</a>, it's been <a href="http://divby0.blogspot.ca/search/label/music">over 3 years</a> since my last music-related post.
<p>The idea for doing this song came after spending a day <a href="https://community.jboss.org/wiki/HowWeCreateOurUpdate-sitesWhatAreTheyWhichOneYouShouldUse">creating a diagram</a> showing how JBoss Tools and Developer Studio are built, followed by <a href="https://twitter.com/myarboro">myarboro</a>'s reaction to the complexity.
<a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-18462-4-18759/HowWeBuild_Diagram.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 305px;" src="http://4.bp.blogspot.com/-dHJQYMqLNbY/T-Dg_imjB6I/AAAAAAAAGxA/K5Ee5Akjueo/s320/HowWeBuild_Diagram.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5755847706004359074" /></a>
<p style="float:right;font-size:x-small"><i>Diagram by <a href="http://projects.gnome.org/dia/">Dia</a></i></p>
</p><blockquote><i>
Through early morning mail I see<br/>
Visions of JIRAs for me<br/>
Build jobs red unexpectedly<br/>
I realize and I can see...<br/>
<br/>
That Open Source is painless<br/>
Even with non-stop changes<br/>
<a href="http://www.jboss.org/tools/download/dev">And yet we give all this away for free</a><br/>
<br/>
The game of rel-eng's hard to play<br/>
We struggle through it anyway<br/>
<a href="http://nick.divbyzero.com/">A business card</a> I'll never lay<br/>
Deprecated: it's <a href="http://www.linkedin.com/profile/view?id=23032885">LinkedIn</a>'s day<br/>
<br/>
Jenkins builds are painless<br/>
They track so many changes<br/>
And ever onward moves complexity<br/>
<br/>
The use of Git trumps SVN<br/>
But migrating's hard to begin<br/>
When your code base is not so slim<br/>
The pain grows stronger... bear & grin<br/>
<br/>
<a href="https://github.com/nickboldt">Using github</a>'s painless<br/>
Pull/push requests for changes<br/>
And I can take or leave it if I please<br/>
<br/>
A Turing test once asked of me<br/>
To answer questions that are key<br/>
'To use Tycho or PDE?'<br/>
And I replied 'Not PDE!'<br/>
<br/>
Releng'ing is painless<br/>
It is a game of changes<br/>
<a href="https://devstudio.jboss.com/earlyaccess/">And still we give all this away for free</a><br/>
And you can do the same thing if you please...</i></blockquote>
<p align="right"><small><a href="http://www.youtube.com/watch?v=4gO7uemm6Yo">
Johnny Mandel & Mike Altman
</a> - <a href="http://www.stlyrics.com/lyrics/televisiontvthemelyrics-50s60s70s/mash.htm">
Suicide is Painless (Theme from M.A.S.H.)
</a></small></p>nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-68562758802789324492012-06-06T15:41:00.006-04:002012-06-06T16:14:38.733-04:00Managing Jenkins job configurations<p>In JBoss Tools and Developer Studio, we manage a lot of build jobs in Jenkins. In fact, for the 3.2.x/4.x and 3.3.x/5.x streams, there are over 195 jobs. When we start building our next year's first milestone, we'll spawn another 40+ jobs.
<p>Here are some of them:
<ul>
<li><a href='http://hudson.jboss.org/hudson/view/JBossTools/view/JBossTools_Trunk/'>http://hudson.jboss.org/hudson/view/JBossTools/view/JBossTools_Trunk/</a>
<li><a href='http://hudson.jboss.org/hudson/view/JBossTools/view/JBossTools_3.3.indigo'>http://hudson.jboss.org/hudson/view/JBossTools/view/JBossTools_3.3.indigo</a>
<li><a href='http://hudson.jboss.org/hudson/view/JBossTools/view/JBossTools_3.2.helios'>http://hudson.jboss.org/hudson/view/JBossTools/view/JBossTools_3.2.helios</a>
</ul>
<p>To assist in performance, we use maven profiles in our <a href='http://anonsvn.jboss.org/repos/jbosstools/branches/jbosstools-3.3.x/build/parent/pom.xml'>parent pom</a> to allow data to be shared outside the slaves' workspaces, without using shared workspaces (as that can lead to conflicts when multiple maven processes try to write to the same .m2 repo). Here's an example:
<pre style="brush:shell">
<!-- same contents as jbosstools-nightly-staging-composite, but locally
available (to improve network lag) -->
<profile>
<id>local.composite</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
<repository>
<id>local.composite</id>
<url>${local.composite}</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
</profile>
</pre>
<p>We also use profiles to turn on code coverage analysis or to take advantage of Jenkins variables like BUILD_NUMBER when setting a timestamped qualifier for features & plugins:
<pre style="brush:shell">
<profile>
<id>hudson</id>
<activation>
<property>
<name>BUILD_NUMBER</name>
</property>
</activation>
<properties>
<local.site>file:///home/hudson/static_build_env/jbds/target-platform_3.3.indigo.SR2/e372M-wtp332M.target/</local.site>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tychoVersion}</version>
<configuration>
<format>'v'yyyyMMdd-HHmm'-H${BUILD_NUMBER}-${BUILD_ALIAS}'</format>
<archiveSite>true</archiveSite>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</pre>
<p>But how do you deal with hundreds of jobs' config files, and how do you update them all easily w/o hours of in-browser clicking?
<blockquote> <b>We maintain the job config files (config.xml) offline</b>. </blockquote>
<p>To do this, we use <b><a href="https://github.com/nickboldt/maven-plugins/tree/master/hudson-job-sync-plugin">a maven plugin I wrote</a></b> to fetch jobs matching a given view & regular expression and store them locally on disk using the same structure as on the server.
<a href="http://3.bp.blogspot.com/-Nz3a1C0sLAg/T8-3fM71DrI/AAAAAAAAGwU/8vDqcgF8Qok/s1600/hudpull.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 257px;" src="http://3.bp.blogspot.com/-Nz3a1C0sLAg/T8-3fM71DrI/AAAAAAAAGwU/8vDqcgF8Qok/s320/hudpull.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5751016995851407026" /></a>
<p>Then that same plugin can be used to push the config.xml files BACK to the server after making changes to one (or all) the files.
<a href="http://1.bp.blogspot.com/-Jq__0PjU6Xo/T8-3ezaA7_I/AAAAAAAAGwI/Ge-U-NEY4GI/s1600/config.xml.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 141px;" src="http://1.bp.blogspot.com/-Jq__0PjU6Xo/T8-3ezaA7_I/AAAAAAAAGwI/Ge-U-NEY4GI/s320/config.xml.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5751016988998692850" /></a>
<p>For an extra level of auditing, we also commit these locally cached config.xml files to SVN so we can track their history. Admittedly Jenkins provides this functionality natively, but when you're POSTing changes to config.xml files the server doesn't always notice a change and record the delta, so having a backup (particularly one you can diff offline) is never a bad idea.
<a href="http://1.bp.blogspot.com/-XwTtGclN2dk/T8-47to9kkI/AAAAAAAAGwg/w-qWZiVVaaQ/s1600/job-config-history.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 176px;" src="http://1.bp.blogspot.com/-XwTtGclN2dk/T8-47to9kkI/AAAAAAAAGwg/w-qWZiVVaaQ/s320/job-config-history.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5751018585178608194" /></a>nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com1tag:blogger.com,1999:blog-17823979.post-50467916847764032092011-12-11T14:12:00.003-05:002011-12-11T14:15:23.127-05:00Build Nomenclature Conventions: What's in a name?<i>The following post is inspired by Mickael Istria's recent blog, <a href="http://mickaelistria.wordpress.com/2011/12/07/call-a-spade-a-spade-and-a-nightly-a-snapshot/">Call a spade a spade, and a Nightly a Snapshot</a>.</i>
<p>
When I was doing builds for the Eclipse Modeling Project, I-builds were weekly published nightlies -- same level of stability as a SNAPSHOT (to use Maven parlance) or nightly, but published on a weekly schedule to bridge the gap between nightly/daily/SNAPSHOT/CI builds and the every-6-weeks milestone releases. The goal was to provide something stable enough for early adopters to grab once a week, but without the non-stop flux of nightlies. Regardless of the label on the build, the process was the same: tag CVS, then build using that tag.
<p>
The Final/GA/Release ("R") builds were done as simple renames of the last good milestone or release candidate build, so as to ensure binary-compatibility w/ the last-tested milestone/RC. The same was true for "M" and "S" builds -- they were just renamed "I" builds, and the letter was there simply to differentiate between a maintenance build (M), a stable milestone (S), or release (R).
<p>
Branching only happened when a release was done and it was time to produce the maintenance stream vs. the ongoing next-year-release. Sometimes branching would happen AFTER the x.y.1 maintenance because it saved duplication of commits in the x.y+1.0 and x.y.1 streams.
<p>
--
<p>
Now at JBoss, we publish "nightly" builds, which are keyed to SVN changes and therefore could be as often as hourly or as infrequent as weekly, depending on what's happening in the repo.
<p>
We also do milestone builds about once ever 6-8 weeks (similar to the Eclipse.org release train schedules), which is more carefully vetted, tested, and QE'd. It is produced using the same *process* as the nightlies, but are named differently and pulled from a freshly-created stable branch in the repo (so its degree of change/churn is less). (Branching happens right before every milestone or release candidate so that hardening/stabilization/documentation can happen in the branch while trunk stays open for new development.)
<p>
--
<p>
Bottom line -- I've only ever needed three types of builds, regardless of nomenclature or labelling differences. And of these 3, the last 2 are the same thing but renamed to underline the build quality/stability:
<p>
* nightly/CI/integration/weekly/SNAPSHOT build (unstable, for bleeding edge adopters)
<p>
* development milestone (probably a re-christened nightly; stable, early adopters)
<p>
* stable release / Final / GA (probably a re-christened milestone; release quality)
<p>
--
<p>
So... does it matter if it's called nightly, integration or SNAPSHOT? or Stable, Milestone, Maintenance, Final, GA or Release? As long as it's easily reproducible (yeah, Tycho!), what's in a name?nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com1tag:blogger.com,1999:blog-17823979.post-73585116959283643072011-11-09T16:24:00.006-05:002011-11-09T16:36:10.092-05:00HOWTO: Make KDE remember dual-monitor randr settings<p>
Every time I boot up, KDE appears to forget that I want my monitors to be positioned left-to-right and instead defaults to mirrored config. But, after a lot of cursing and a little googling, I found an answer so it'll no so much keep your settings, but reset its broken config to your settings.
<p>
1. Hit ALT-F2, then enter "display" to run the Display Settings app.
<p>
2. Configure your settings as you'd like. Note that if the Apply button isn't active after your changes, you can change/revert something like a Position: button to make it active.
<p>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAnyvj9yhRXBM5M6HgqWgPOHRmQSimEkZaZecfsA9l0KldTCImIpxLw_MQLpese_lmKleUT4S3Eq9e95JCHzCMgJ_6AjgF3xOfjR0DCcThgIv3W3ZaxP9i8Rce0jVcDoRfnkJc6g/s1600/kde-display-settings.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 246px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAnyvj9yhRXBM5M6HgqWgPOHRmQSimEkZaZecfsA9l0KldTCImIpxLw_MQLpese_lmKleUT4S3Eq9e95JCHzCMgJ_6AjgF3xOfjR0DCcThgIv3W3ZaxP9i8Rce0jVcDoRfnkJc6g/s320/kde-display-settings.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5673110910659531634" /></a>
<p>
3. On restart, KDE may forget your dual-monitor settings. So, to prevent this, go look in your <tt>~/.kde/share/config/krandrrc</tt> file:
<pre class="brush:shell">
[Display]
ApplyOnStartup=true
StartupCommands=xrandr --output "DVI-I-1" --pos 1920x0 --mode 1920x1200 --refresh 59.9502\nxrandr --output "HDMI-1" --pos 0x130 --mode 1920x1080 --refresh 60\nxrandr --noprimary
</pre>
<p>
4. Copy the configuration into a new file, and replace <tt>\n</tt> with newlines. I like to put scripts like this in <tt>/etc/X11</tt> because they relate to screen res and positioning.
<pre class="brush:shell">
# from ~/.kde/share/config/krandrrc
xrandr --output "DVI-I-1" --pos 1920x0 --mode 1920x1200 --refresh 59.9502
xrandr --output "HDMI-1" --pos 0x130 --mode 1920x1080 --refresh 60
xrandr --noprimary
</pre>
<p>5. Ensure the script is readable/executable for all users:
<pre class="brush:shell">
chmod 755 /etc/X11/1920x2.sh
</pre>
<p>6. Hit ALT-F2, then enter "autostart" to run the Autostart config tool.
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwm1TxN45W8_oCN7sgDpGKG-UcTJx0cODVs4TFHzS1-iXDw1aCRIN97nAiUoRIQigN-bGl5Dwkv6pdLcxivHTNN2q_S1zO7XqhlLwMjMEVasRcjJhOh5QIXNGw-ahRK1f0aBVp2w/s1600/autostart_fix_screen_resolution.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 238px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwm1TxN45W8_oCN7sgDpGKG-UcTJx0cODVs4TFHzS1-iXDw1aCRIN97nAiUoRIQigN-bGl5Dwkv6pdLcxivHTNN2q_S1zO7XqhlLwMjMEVasRcjJhOh5QIXNGw-ahRK1f0aBVp2w/s320/autostart_fix_screen_resolution.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5673112140852228834" /></a>
<p>7. Click <tt>Add script... </tt> and browse for the script you created above.
<p>8. Reboot and watch the magic unfold.nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com7tag:blogger.com,1999:blog-17823979.post-76083014730380778482011-10-29T14:22:00.008-04:002011-10-29T14:47:01.868-04:00HOWTO: See what happened in SVN between builds<p>
I was recently asked how to determine what changed between two builds. Jenkins provides nice interlinks into JIRA (issues), Fisheye (source changes), SVN (sources), but let's say you want to kick things a little more old school and investigate the old way... or the builds you want to compare are no longer shown in Jenkins because they expired and their metadata was automatically purged.
<p>
If you can't just look at the changelog in Jenkins to see what revision of source was used for the build, you can check the SVN log to find revision numbers based on the timestamp of the build.
<p>
So, if your build was generated on 2011-10-18, you can see that the log shows the last commit before that build was this:
<pre class="brush:shell">
$ svn log http://svn.jboss.org/repos/jbosstools/branches/jbosstools-3.2.x/
...
r35735 | bfitzpat | 2011-10-17 15:35:23 -0400 (Mon, 17 Oct 2011) | 2 lines
Changed paths:
A esb/plugins/.project
M esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java
JBDS-1889 - Now checking for juddi-client-3.1.2.jar as well as 3.1.0 and 3.1.1 when seeing if the runtime includes ESB 4.10
...
</pre>
<p>
Want to see actual diffs between that build and the latest one?
<pre class="brush:shell">
$ svn diff http://svn.jboss.org/repos/jbosstools/branches/jbosstools-3.2.x/@35735 http://svn.jboss.org/repos/jbosstools/branches/jbosstools-3.2.x/
</pre>
<p>
Or, if you want to collect just the section of log relevant to the change:
<pre class="brush:shell">
$ svn log -r35735:HEAD http://svn.jboss.org/repos/jbosstools/branches/jbosstools-3.2.x/
</pre>
<p>
Of course if you have all the sources locally, you don't need to log or diff via a URL - you can simply use local file paths. And if like me you use git-svn instead of pure svn, you can use that to diff or log too.
<p>
If you want to easily determine when a branch was created and get the SVN revision number for that branch point, use this:
<pre class="brush:shell">
# from r28571, returns -r28571:HEAD
rev=$(svn log --stop-on-copy \
http://svn.jboss.org/repos/jbosstools/branches/jbosstools-3.2.x \
| egrep "r[0-9]+" | tail -1 | sed -e "s#\(r[0-9]\+\).\+#-\1:HEAD#")
</pre>
<p>If you'd like to <a href="http://beerpla.net/2010/02/20/how-to-view-a-specific-svn-revision-in-your-browser/">view a specific svn revision in your browser</a>, use <tt>!svn/bc/REVISION_NUMBER/ before the branch and path to file or folder:
<p>
<a href="http://svn.jboss.org/repos/jbosstools/!svn/bc/35735/branches/jbosstools-3.2.x/">http://svn.jboss.org/repos/jbosstools/!svn/bc/35735/branches/jbosstools-3.2.x/</a>nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-40308052476548710732011-10-26T20:48:00.003-04:002011-10-26T20:51:51.851-04:00HOWTO: Use Maven, Ant, and XSLT to scrub unwanted p2 metadata from an update site<p>Some time ago, <a href="http://divby0.blogspot.com/2011/02/simplifying-p2-process-part-4-using.html">I wrote about Using p2.inf to add/remove update sites</a>. Tonight I found a simpler way to remove references in p2 metadata to external 3rd party sites.
<p>For example, say you're repackaging some 3rd party features onto your own site, but don't want those features to provide references to the vendor's own update sites because you want to ensure that your product's site will only result in your sanctioned version being installed.
<p>When you generate an update site, p2 pulls the information in the included features and will result in a section of references in the site's metadata that looks like this:
<p><pre class="brush:xml">
<references size="6">
<repository uri="http://download.eclipse.org/egit/updates" url="http://download.eclipse.org/egit/updates" type="0" options="0"/>
<repository uri="http://subclipse.tigris.org/update_1.6.x" url="http://subclipse.tigris.org/update_1.6.x" type="1" options="0"/>
<repository uri="http://download.eclipse.org/egit/updates" url="http://download.eclipse.org/egit/updates" type="1" options="0"/>
<repository uri="http://subclipse.tigris.org/update_1.6.x" url="http://subclipse.tigris.org/update_1.6.x" type="0" options="0"/>
<repository uri="http://eclipse.svnkit.com/1.3.x/" url="http://eclipse.svnkit.com/1.3.x/" type="0" options="0"/>
<repository uri="http://eclipse.svnkit.com/1.3.x/" url="http://eclipse.svnkit.com/1.3.x/" type="1" options="0"/>
</references>
</pre>
To remove that, you can play with p2.inf directives, or you can simply perform an XSL transformation on the generated content.xml (inside content.jar, if your metadata is compressed) to remove the <tt><references/></tt> node:
<p><pre class="brush:xml">
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/">
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="*">
<xsl:copy >
<xsl:for-each select="@*">
<xsl:copy />
</xsl:for-each>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="references" />
</xsl:stylesheet>
</pre>
If you're generating your update site w/ Tycho, this transform can be called via a simple Ant script:
<p><pre class="brush:xml">
<target name="remove.references">
<!-- requires ant-contrib only if you like using if-then-else structures -->
<if>
<available file="${update.site.source.dir}/content.jar" type="file" />
<then>
<unzip src="${update.site.source.dir}/content.jar" dest="${update.site.source.dir}" />
<delete file="${update.site.source.dir}/content.jar" />
</then>
</if>
<copy file="${update.site.source.dir}/content.xml" tofile="${update.site.source.dir}/content.old.xml" overwrite="true" />
<xslt style="remove-references.xsl" in="${update.site.source.dir}/content.old.xml" out="${update.site.source.dir}/content.xml" />
<zip destfile="${update.site.source.dir}/content.jar" basedir="${update.site.source.dir}" includes="content.xml" />
<delete file="${update.site.source.dir}/content.xml" />
<delete file="${update.site.source.dir}/content.old.xml" />
</target>
</pre>
Then, in your site's pom.xml, to call the Ant script, do this:
<p><pre class="brush:xml">
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<!-- make sure this variable is defined, eg., set to 1.3 -->
<version>${maven.antrun.plugin.version}</version>
<executions>
<execution>
<id>install</id>
<phase>install</phase>
<configuration>
<quiet>true</quiet>
<tasks>
<!-- called AFTER generating update site + zip to tweak content -->
<ant antfile="build.xml">
<property name="SOME_ANT_VARIABLE" value="${SOME_MAVEN_VARIABLE}" />
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<!-- some dependencies your ant script might need -->
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-trax</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-commons-net</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-apache-regexp</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</pre>
<p>I suppose there's probably a way to call a transform directly from Maven w/o the Ant wrapper, but this allows unpacking and repacking of the content.jar to get at the content.xml file.nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-54503423307260638772011-09-01T02:03:00.011-04:002011-09-01T02:51:45.655-04:00HOWTO: Move around between desktops & windows with keyboard or mouse<p>Recently installed <a href="http://spins.fedoraproject.org/kde/">Fedora 15 KDE spin</a>, partly because the XFCE spins wouldn't boot from CD but also because I've heard less-than-favourable things about Gnome3 and because I'm addicted to Konqueror as a graphical sftp/scp/ssh viewer, so figured might as well use kdm instead of xfwm4 or gdm.
<p>Still having some problems getting my 1600x1200 (or 1920x1200) monitor to do anything more than 1024x768 on the VGA port of the video card (works fine on the DisplayPort connector, either directly or via a DP-to-DVI cable, but not on the VGA connector, even with xorg.conf hackery). That said the options for display/monitor management under KDE are much better than under XFCE, and this is the first time I've been able to get two monitors working without HOURS of hacking away at xorg.conf scripts. So... big props for this release *almost* Just Working.
<p>
Workaround I'm trying next is to install a second video card. Will update when/if that solves the problem once it arrives.
<p>
But video resolution aside, I did recently figure out how to set keyboard bindings for moving windows between desktops (thanks to <a href="http://productivity.davidfisco.com/2011/06/organizing-your-kde-desktops-and.html">David Fisco</a>). From the K-menu, select <b>System Settings > Shortcuts and Gestures > Global Keyboard Shortcuts > KDE Component: KWin > "Window One Desktop To The Left/Right"</b>:
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-fSaXvZeOaos/Tl8hce6VqMI/AAAAAAAAGWg/ha5En9_bQrc/s1600/kde-move-windows-between-desktops.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 202px;" src="http://4.bp.blogspot.com/-fSaXvZeOaos/Tl8hce6VqMI/AAAAAAAAGWg/ha5En9_bQrc/s320/kde-move-windows-between-desktops.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5647269230963697858" /></a>
<p>... and for switching between desktops (<b>"Switch To Next/Previous Desktop"</b>)
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-6Z6C602zBfc/Tl8h6k_356I/AAAAAAAAGWo/Stdv1Ib4_B8/s1600/kde-switch-between-desktops.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 202px;" src="http://3.bp.blogspot.com/-6Z6C602zBfc/Tl8h6k_356I/AAAAAAAAGWo/Stdv1Ib4_B8/s320/kde-switch-between-desktops.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5647269747993601954" /></a>
<p>Also recently discovered some fun options for switching between windows (on all desktops). From the K-menu, select <b>System Settings > Desktop Effects > Enable desktop effects > Effect for window switching: Present Windows</b> (or any of the other options).
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-BWnwj-5gWko/Tl8kG5Z6JYI/AAAAAAAAGW0/66-my3qtV8g/s1600/snapshot1.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 280px;" src="http://3.bp.blogspot.com/-BWnwj-5gWko/Tl8kG5Z6JYI/AAAAAAAAGW0/66-my3qtV8g/s320/snapshot1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5647272158653195650" /></a>
<p>There's also <b>System Settings > Window Behavior > Task Switcher > Effect: Present Windows</b>:
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-9C1NjsF5q_U/Tl8mMRIPHGI/AAAAAAAAGXM/t4Uq-ELy29c/s1600/snapshot3.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 274px;" src="http://2.bp.blogspot.com/-9C1NjsF5q_U/Tl8mMRIPHGI/AAAAAAAAGXM/t4Uq-ELy29c/s320/snapshot3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5647274449944124514" /></a>
<p>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-4gtWa5xUywY/Tl8lLTSKeHI/AAAAAAAAGXA/5nU0Yg-MIlY/s1600/snapshot2.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://1.bp.blogspot.com/-4gtWa5xUywY/Tl8lLTSKeHI/AAAAAAAAGXA/5nU0Yg-MIlY/s320/snapshot2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5647273333831137394" /></a>
<p>You might want to set an animation for switching between desktops, though I find with multiple monitors this can be a bit dizzying. From the K-menu, select <b>System Settings > Workspace Behavior > Virtual Desktops > Switching > Animation: Desktop Cube Animation</b>. For something more subtle, try "Fade Desktop".
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-8ckNKZbYlKs/Tl8nM3ftRFI/AAAAAAAAGXY/tVfL5bHLtvc/s1600/snapshot4.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 274px;" src="http://2.bp.blogspot.com/-8ckNKZbYlKs/Tl8nM3ftRFI/AAAAAAAAGXY/tVfL5bHLtvc/s320/snapshot4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5647275559754744914" /></a>
<p>Finally, you may want to set screen edge behaviours, such as making Present Windows appear when you cursor to the top-center of your screen. <b>System Settings > Workspace Behavior > Screen Edges > right-click a target zone:
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-lwN9CMCjFHE/Tl8pLlYrgtI/AAAAAAAAGXk/5vzEff8jcpw/s1600/snapshot5.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 270px;" src="http://3.bp.blogspot.com/-lwN9CMCjFHE/Tl8pLlYrgtI/AAAAAAAAGXk/5vzEff8jcpw/s320/snapshot5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5647277736736817874" /></a>nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-78038569996516415372011-08-16T15:15:00.005-04:002011-08-16T15:27:36.552-04:00Mounting Linux LVM drives<p>Because my Thinkpad X200 has finally, after just under 3 years, decided to give up the ghost via a FAN ERROR and refusal to start (POST beeps & auto-shutdown), I'm now faced with the task of recovering all the data on the drive (about 120G) across multiple partitions.
<p>
Here's the drive layout, as per cfdisk:
<p><pre class="brush:shell"> cfdisk (util-linux-ng 2.17.2)
Disk Drive: /dev/sdb
Size: 160041885696 bytes, 160.0 GB
Heads: 255 Sectors per Track: 63 Cylinders: 19457
Name Flags Part Type FS Type [Label] Size (MB)
--------------------------------------------------------------------------------------------------
sdb1 Primary NTFS [^B] 26214.44 *
sdb2 Boot Primary Linux ext3 209.72 *
Logical Free Space 3.68 *
sdb5 Logical Linux ext3 [HOME] 106043.70 *
sdb6 NC Logical Linux LVM 20970.48 *
Logical Free Space 1.09 *
sdb4 Primary Compaq diagnostics 6595.71 *
Unusable 0.49 *
</pre>
<p>So, under a Fedora 13 LiveCD, the /boot (sdb2) and /home (sdb5) partitions automounted, along with the WinXP (sdb1) partition. But the root partition (/, part of sdb6) would not as it's part of a LVM. After a <a href="http://lmgtfy.com/?q=mount+linux+lvm+partition">quick burst of googling</a>, <a href="http://linuxers.org/howto/how-mount-linux-lvm-volume-partitions-linux">I found this solution</a>, which digests down to simply this:
<p><pre class="brush:shell">
yum install lvm2 -y; # install support for lvm2
pvscan # scan vol groups
vgchange vg_x2lappy -a y # mark your vol group active
lvscan # scan for logical volumes
mkdir /media/sdb6 # create a mount point
mount /dev/vg_x2lappy/lv_root /media/sdb6/ # mount the lv
cd /media/sdb6/; ls -la # take off every zig!
</pre>nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com1tag:blogger.com,1999:blog-17823979.post-81891973835754145372011-07-27T11:48:00.003-04:002011-07-27T12:46:36.116-04:00MANIFEST.MF and feature.xml versioning rulesI'm forever forgetting what the rules are for dependency declarations in MANIFEST.MF and feature.xml for <a href="#plugin">osgi plugins</a> and <a href="#feature">features</a>. And Googling often results in frustration rather than an answer. So, because today I actually found a concise list of the rules, I thought I'd repost them here, with some minor edits to help clarify.
<blockquote>
<a name="plugin"></a><h4>OSGi Plugin Version Ranges</h4><p>Dependencies on bundles and packages have an associated <em>version range</em> which is specified using an interval notation: a square bracket
“[” or “]” denotes
an <em>inclusive</em> end of the range and a round bracket
“(” or “)” denotes
an <em>exclusive</em> end of the range. Where one end of the range is to be included and the other excluded, it is permitted to
pair a round bracket with a square bracket.
The examples below make this clear.</p><p>If a single version number is used where a version <em>range</em> is
required this does <em>not</em> indicate a single version, but the range <em>starting</em> from that version and
including all higher versions.</p><p>There are four common cases:
<ul type="disc">
<li><p>A “strict” version range, such as [1.2.3,1.2.3], which
denotes that version and only that version.</p></li>
<li><p>A “half-open” range, such as [1.2.3,2.0.0), which has an inclusive lower limit
and an exclusive upper limit, denoting version 1.2.3 and any version after this, up
to, <em>but not including</em>, version 2.0.0.
</p></li>
<li><p>An “unbounded” version range, such as 1.2.3, which
denotes version 1.2.3 and <em>all</em> later versions.</p></li>
<li><p>No version range, which denotes any version will be acceptable. <span style="font-weight:bold;"><span style="font-style:italic;">NOT RECOMMENDED.</span></span></p></li>
</ul>
</blockquote>
<a href="http://divbyzero.com/eclipse/osgi-concepts-versioning.html">The complete text of the above snippet can be seen here</a> (<a href="http://divbyzero.com/eclipse/osgi-concepts-versioning.pdf">or here as PDF</a>).
<p>Example:
<pre class="brush:shell">
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
org.eclipse.ui.navigator;bundle-version="3.5.100",
com.ibm.icu</pre>
<p>See also:
<ul>
<li><a href="http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/reference/misc/plugin_manifest.html">plugin manifest</a> (plugin.xml)</li>
<li><a href="http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/reference/misc/bundle_manifest.html">osgi bundle manifest</a> (MANIFEST.MF)</li>
</ul>
<hr/>
<a name="feature"></a>In terms of feature manifest (feature.xml) rules, <a href="http://help.eclipse.org">help.eclipse.org</a> has pretty good documentation, but the most important thing to remember - and what I often have to look up - is how to state the matching rules for required upstream features & plugins.
Experience says it's always better to state things explicitly so there's no downstream guesswork needed and anyone reading your manifest knows EXACTLY what version(s) are required for or compatible with your feature. Plus, while YOU might be using PDE UI to build, someone else might be using Tycho and Maven, and every tool can interpret missing metadata their own way.
<p><b><i>When in doubt, spell it out.</i></b>
<blockquote>Valid values and processing are as follows:
<ul><li>if version attribute is not specified, the match attribute (if specified) is ignored.
<li><span style="font-style:italic;"><span style="font-weight:bold;">perfect</span></span> - dependent plug-in version must match exactly the specified version. If "patch" is "true", "perfect" is assumed and other values cannot be set. <span style="font-style:italic;">[1.2.3,1.2.3]</span>
<li><span style="font-style:italic;"><span style="font-weight:bold;">equivalent</span></span> - dependent plug-in version must be at least at the version specified, or at a higher service level (major and minor version levels must equal the specified version). <span style="font-style:italic;">[1.2.3,1.3)</span>
<li><span style="font-style:italic;"><span style="font-weight:bold;">compatible</span></span> - dependent plug-in version must be at least at the version specified, or at a higher service level or minor level (major version level must equal the specified version). <span style="font-style:italic;">[1.2.3,2.0)</span>
<li><span style="font-style:italic;"><span style="font-weight:bold;">greaterOrEqual</span></span> - dependent plug-in version must be at least at the version specified, or at a higher service, minor or major level. <span style="font-style:italic;">1.2.3</span></ul>
</blockquote>
<a href="http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/reference/misc/feature_manifest.html">The complete text of the above snippet can be seen here</a>.
<p>Example:
<pre class="brush:xml">
<requires>
<import feature="org.eclipse.m2e.feature" version="1.0.0" match="compatible"/>
<import feature="org.maven.ide.eclipse.wtp.feature" version="0.13.0" match="greaterOrEqual"/>
<plugin id="ch.qos.logback.classic" version="0.9.27.v20110224-1110" match="greaterOrEqual"/>
<plugin id="ch.qos.logback.core" version="0.9.27.v20110224-1110" match="greaterOrEqual"/>
<plugin id="ch.qos.logback.slf4j" version="0.9.27.v20110224-1110" match="greaterOrEqual"/>
<plugin id="org.slf4j.api" version="1.6.1.v20100831-0715" match="compatible"/>
<plugin id="com.ning.async-http-client" version="1.6.3.201106061504" match="equivalent"/>
<plugin id="org.jboss.netty" version="3.2.4.Final-201106061504" match="perfect"/>
<plugin id="org.hamcrest.core" version="1.1.0.v20090501071000" match="equivalent"/>
</requires></pre>nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0tag:blogger.com,1999:blog-17823979.post-25474777407733025192011-06-06T17:20:00.003-04:002011-06-06T17:43:17.726-04:00HOWTO: get xorg.conf to work w/ 1600x1200 res and an old Intel card<ol><li>Check your hardware spec, and determine how much memory your card has<a href="http://www.ubuntugeek.com/intel-graphics-performance-guide-for-ubuntu-904-jaunty-users.html">[1]</a>:
<pre class="brush:shell"># lspci -vv | grep "Intel" -A7 | grep "VGA controller" -A7 | egrep "controller|Region"
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02) (prog-if 00 [VGA controller])
Region 0: Memory at e0000000 (32-bit, prefetchable) [size=128M]
Region 1: Memory at d0000000 (32-bit, non-prefetchable) [size=512K]</pre>
<li> Use the above values to configure your /etc/X11/xorg.conf file - I suspect much of this is not needed, but here's what I have:
<pre class="brush:shell">Section "Device"
Identifier "Intel"
Option "AccelMethod" "UXA"
VideoRam 130560
#Driver "intel"
Driver "vesa"
VendorName "Intel Corporation"
BoardName "82852/855GM Integrated Graphics Device"
BusID "PCI:0:2:0"
EndSection
Section "Monitor"
Identifier "VGA"
ModelName "Sceptre 24"
HorizSync 31 - 80
VertRefresh 55 - 76
Option "DPMS" "true"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Intel"
Monitor "VGA"
DefaultDepth 16
SubSection "Display"
Depth 16
Modes "1920x1440_60" "1920x1200_60" "1920x1080_60" "1680x1050_59.883" "1360x768_59.8" "1600x1200_60" "1280x1024_60" "1024x768_60"
#Modes "1920x1440" "1600x1200" "1280x1024" "1280x768"
EndSubSection
EndSection
Section "DRI"
Mode 0666
EndSection
Section "Extensions"
Option "Composite" "Enable"
EndSection
Section "Module"
Load "dri"
EndSection</pre>
<li> In /boot/grub/menu.lst, add the correct vga mode for 1600x1200 (<span style="font-weight:bold;">vga=8</span>). If you enter what you think is the correct mode based on <a href="http://en.wikipedia.org/wiki/VESA_BIOS_Extensions#Linux_video_mode_numbers">this table</a>, you'll be told it's wrong and can manually correct it, boot up, then fix the file & reboot.
<pre class="brush:shell">default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora (2.6.34.7-56.fc13.i686)
root (hd0,0)
kernel /vmlinuz-2.6.34.7-56.fc13.i686 ro root=/dev/mapper/vg_xlappy-lv_root rd_LVM_LV=vg_xlappy/lv_root rd_LVM_LV=vg_xlappy/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet vga=8
initrd /initramfs-2.6.34.7-56.fc13.i686.img
title Fedora (2.6.34.7-56.fc13.i686) cmdline only, vga=8 = 1600x1200x16
root (hd0,0)
kernel /vmlinuz-2.6.34.7-56.fc13.i686 ro root=/dev/mapper/vg_xlappy-lv_root rd_LVM_LV=vg_xlappy/lv_root rd_LVM_LV=vg_xlappy/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us init=3 init 3 vga=8
initrd /initramfs-2.6.34.7-56.fc13.i686.img</pre>
</ol>
<p>See also:
<ul>
<li><a href="http://wiki.antlinux.com/pmwiki.php?n=HowTos.VgaModes">VGA Modes</a>
<li><a href="http://blog.devnu11.net/2008/11/grub-vga-mode/">grub VGA Modes</a>
</ul>nickbhttp://www.blogger.com/profile/09200865148587349560noreply@blogger.com0