tag:blogger.com,1999:blog-15887969721205327122023-11-16T05:52:49.322-05:00incomplete-co.dea collection of blog posts on Spring, Spring Batch, Spring Integration, Spring Data and other Java related technologiesrandom_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.comBlogger164125tag:blogger.com,1999:blog-1588796972120532712.post-77420005172377610892017-10-28T12:44:00.002-04:002017-10-28T12:44:38.311-04:00devstack on centos7 on virtualbox<div dir="ltr" style="text-align: left;" trbidi="on">
when trying to install devstack on centos7 on virtualbox, you may run into an error about "Could not determine host IP address".<br />
<br />
a workaround for this is;<br />
- open stackrc<br />
- find HOST_IP<br />
- change it to read HOST_IP=${HOST_IP:-10.0.2.15}<br />
<br />
and you're off!<br />
<br />
<a href="https://bugs.launchpad.net/devstack/+bug/1644145/comments/4">https://bugs.launchpad.net/devstack/+bug/1644145/comments/4</a></div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-44805785778044565972017-10-26T00:51:00.001-04:002017-10-26T00:51:23.218-04:00Java to .Net - REST APIs and Controllers - Some notes<div dir="ltr" style="text-align: left;" trbidi="on">
some quick notes about using .NET Core controllers in C#;<br />
- the url maps to the name of the controller class<br />
<br />
so, class BlahController : Controller will create a URL of /blah<br />
<br />
<br /></div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-25920815713880298062017-10-19T01:06:00.002-04:002017-10-19T01:06:34.745-04:00Agile - User Stories<div dir="ltr" style="text-align: left;" trbidi="on">
i'm going to try and capture some points about user stories here as a rough guide;<br />
<br />
- a user has a context --> always understand the persona, entering context, and exit context of a user. "User A is an anonymous user of the site. We know nothing about them when the first enter but we want to at least identify them when they leave." "User B is an admin of the site, we know who they should be and once they leave, we want to know what they've done."<br />
<br />
- a story should be simple --> "as User A, I want to do x, and have y at the end".<br />
<br />
- big stories can become epics really quick --> "as a Known User, I want to login and see my dashboard". This is an epic because there's authentication stories, ("as a Known user, I want to enter my username and password and be granted access/shown an error"), there's setting the authentication (2FA? administration? etc.) and then there's the last, dashboard.<br />
<br />
- a simple user story --> "as an Anonymous User, I want to send a contact request and get a contact request receipt"<br />
<br />
- every story should have an acceptance criteria and/or definition of done --> "... and get a contact request receipt"<br />
<br />
<br />
<h3 style="text-align: left;">
References </h3>
<br />
<a href="https://www.alexandercowan.com/best-agile-user-story/#Creating_a_User_Story">https://www.alexandercowan.com/best-agile-user-story/#Creating_a_User_Story</a><br />
<a href="https://www.scrumalliance.org/community/articles/2014/march/stories-versus-themes-versus-epics">https://www.scrumalliance.org/community/articles/2014/march/stories-versus-themes-versus-epics</a></div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-37025073554022907272017-06-18T03:49:00.002-04:002017-07-24T03:11:57.814-04:00Forwarding Ports with IPTables<div dir="ltr" style="text-align: left;" trbidi="on">
to use IPTables to forward ports...<br />
<br />
<pre style="font-size: 14.039999961853027px; line-height: 19.6560001373291px; margin-bottom: 1em; padding: 0px;"><code style="font-size: 13.057199478149414px; font-style: inherit; line-height: 13.057199478149414px; margin: 0px; padding: 0px;">iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080</code></pre>
<br />
all this from <a href="http://richardfergie.com/redirect-port-80-to-a-different-port-using-iptables">http://richardfergie.com/redirect-port-80-to-a-different-port-using-iptables</a><br />
<br />
and how to remove the routing<br />
<br />
iptables -t nat --line-numbers -L<br />
iptables -t nat -D PREROUTING [number]</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-31693484547446137652017-03-13T03:22:00.000-04:002017-03-13T03:22:03.503-04:00Using the Docker Embedded DNS<div dir="ltr" style="text-align: left;" trbidi="on">
this is an easy way I just discovered and am noting it here so I don't forget.<br />
<br />
to leverage docker's embedded dns, you can setup a custom network and then each container can resolve to each other via the 'name' attribute.<br />
<br />
for example;<br />
<br />
1. docker network create internaldns<br />
2. docker run --name rmq -p 15672:15672 --net=internaldns -d rabbitmq:management<br />
3. docker run --name httpcontainer -p 8080:8080 --net=internaldns -d scbs/http-rmq<br />
<br />
this gives you;<br />
- ability to connect to the host network via bridge<br />
- ability to have httpcontainer look up the rabbitmq container using the dns entry 'rmq'<br />
<br />
i <i>love</i> weave.works and think weave net is particularly awesome, but if you're just doing dns lookup on <i>1</i> docker host, this seems pretty light and easy</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-90845665188092891032017-03-11T12:58:00.001-05:002017-03-11T12:58:10.667-05:00NativeScript WebView - Getting the HTML Content<div dir="ltr" style="text-align: left;" trbidi="on">
If you're trying to get the content from a NativeScript WebView, try the following from StackOverflow<br />
<div>
<br /></div>
<div>
<pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">if (webView.ios) {
var webHeader = webView.ios.stringByEvaluatingJavaScriptFromString("document.head.innerHTML").trim();
console.log(webHeader);
var webBody = webView.ios.stringByEvaluatingJavaScriptFromString("document.body.innerHTML").trim();
console.log(webBody);
} else if (webView.android) {
webTitle = webView.android.getTitle(); //getting the title title
console.log(webTitle)
}</code></pre>
</div>
<div>
<br /></div>
<div>
<a href="http://stackoverflow.com/questions/40639473/get-content-of-webview-in-nativescript">http://stackoverflow.com/questions/40639473/get-content-of-webview-in-nativescript</a></div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-67283155209216697222016-11-23T06:54:00.001-05:002017-03-03T12:50:37.661-05:00Docker on Ubuntu: http:///var/run/docker.sock/v1.18/containers/json: dial unix /var/run/docker.sock: permission denied<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
after installing 1.12.3 on Ubuntu 16.04, the permission denied issue came up. after trying the docker group settings without any luck, the only thing left was to actually chmod the socket.</div>
<div>
<br /></div>
<div>
chmod 777 /var/run/docker.sock</div>
<div>
<br /></div>
<div>
and everything works</div>
<div>
<br /></div>
<div>
probably <i>not</i> the wisest thing to do and you can try chmod'ing with more restrictions, but after hours of google and frustration, it works.</div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-27994769187952971382016-11-02T01:05:00.001-04:002017-03-03T12:51:15.278-05:00Get the Guest IP Address for a VM in VMWare Fusion<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
Great little trick from <a href="http://superuser.com/questions/373192/how-do-i-find-the-ip-address-of-a-virtual-machine-using-vmware-fusion">here</a>...</div>
<div>
<br /></div>
<div>
/Applications/VMware\ Fusion.app/Contents/Library vmrun getGuestIPAddress [location of your VM's .vmx]</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-30713551775602857842016-10-22T03:37:00.004-04:002017-03-03T12:51:44.420-05:00Jenkins on Docker - Admin Password<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
try this from the comments on hub.docker.com --> full credit to <span style="background-color: white; color: #555555; font-family: "helvetica neue" , "helvetica" , "roboto" , "arial" , sans-serif; font-size: 16px;">sidmalani</span></div>
<br />
<span style="background-color: white; color: #555555; font-family: "helvetica neue" , "helvetica" , "roboto" , "arial" , sans-serif; font-size: 16px;">docker exec -it jenkins_test cat /var/jenkins_home/secrets/initialAdminPassword</span><br />
<span style="background-color: white; color: #555555; font-family: "helvetica neue" , "helvetica" , "roboto" , "arial" , sans-serif; font-size: 16px;"><br /></span>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-41307344342313438772016-10-17T04:41:00.002-04:002016-10-17T04:41:25.963-04:00Docker Remote API and Docker for Mac<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
How to get the HTTP API on Docker for Mac</h2>
a <i>fantastic</i> tutorial and helper for setting up HTTP access to docker on mac<br />
<br />
<a href="https://www.ivankrizsan.se/2016/05/21/docker-api-over-http-on-mac-os-x-with-docker-for-mac-beta/">https://www.ivankrizsan.se/2016/05/21/docker-api-over-http-on-mac-os-x-with-docker-for-mac-beta/</a></div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-57556472395404302602016-10-16T07:11:00.002-04:002016-10-16T07:11:52.883-04:00Eclipse Che and localhost<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Eclipse Che and localhost</h2>
<div>
when running eclipse che locally, you may have troubles starting up the various agents, etc. unless you export the correct IP address.</div>
<div>
<br /></div>
<div>
so, to make sure it all works smoothly;</div>
<div>
- export CHE_HOST_IP=[your ip]</div>
<div>
or</div>
<div>
- CHE_HOST_IP=[your ip] che start</div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-66283744494390898892016-08-23T08:19:00.000-04:002017-03-19T04:32:21.845-04:00nginx ubuntu and letsencrypt.org and name.com<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
recently i needed to setup a secure domain on an EC2 instance (need to use the Google Maps Javascript API and it requires HTTPS domains). the application architecture was;</div>
<div>
<ul style="text-align: left;">
<li>angularjs (front-end)</li>
<li>NodeJS (front-end server) http://:3000</li>
<li>spring-boot (data server) http://:8080</li>
</ul>
<div>
to get this working on EC2, nginx was added to help act as a HTTPS terminator and router for the NodeJS instance. </div>
</div>
<div>
<br /></div>
<h3 style="text-align: left;">
domain routing --> name.com</h3>
<div>
this is not a <i>permanent</i> solution, just a demo, so I used and A record at name.com to point to my Elastic IP address. the trick here is to add 2 A records; [blank].example.com --> [elastic IP] and *.example.com --> [elastic IP]. this needs to be done to support <a href="https://letsencrypt.org/">https://letsencrypt.org</a></div>
<div>
<br /></div>
<h3 style="text-align: left;">
letsencrypt.org</h3>
<div>
the steps to follow (on ubuntu) are</div>
<div>
<ol style="text-align: left;">
<li>sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt</li>
<li>sudo apt-get install nginx</li>
<li>sudo vi /etc/nginx/sites-available/default</li>
<li>add location ~/.well-known { allow all; }</li>
<li>sudo ./letsencrypt-auto certonly -a webroot --webroot-path=/usr/share/nginx/html -d example.com -d www.example.com</li>
<li>(go through the on screen prompts)</li>
<li>sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048</li>
<li>add ssl to the nginx default</li>
<li>add redirect on port 80 to 443 (HTTP 301)</li>
</ol>
<div>
below is an example of the nginx default file</div>
</div>
<div>
<br /></div>
<div>
<div>
server {</div>
<div>
listen 80;</div>
<div>
server_name example.com www.example.com;</div>
<div>
return 301 https://$host$request_uri;</div>
<div>
}</div>
<div>
<br /></div>
<div>
server {</div>
<div>
listen 443 ssl;</div>
<div>
<br /></div>
<div>
server_name sexample.com www.example.com;</div>
<div>
<br /></div>
<div>
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;</div>
<div>
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;</div>
<div>
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;</div>
<div>
ssl_prefer_server_ciphers on;</div>
<div>
ssl_dhparam /etc/ssl/certs/dhparam.pem;</div>
<div>
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';</div>
<div>
ssl_session_timeout 1d;</div>
<div>
ssl_session_cache shared:SSL:50m;</div>
<div>
ssl_stapling on;</div>
<div>
ssl_stapling_verify on;</div>
<div>
add_header Strict-Transport-Security max-age=15768000;</div>
<div>
<br /></div>
<div>
location ~ /.well-known {</div>
<div>
allow all;</div>
<div>
}</div>
<div>
<br /></div>
<div>
location / {</div>
<div>
proxy_pass http://localhost:3000;</div>
<div>
proxy_http_version 1.1;</div>
<div>
proxy_set_header Upgrade $http_upgrade;</div>
<div>
proxy_set_header Connection 'upgrade';</div>
<div>
proxy_set_header Host $host;</div>
<div>
proxy_cache_bypass $http_upgrade;</div>
<div>
}</div>
<div>
}</div>
</div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-17942992197931998772016-07-17T04:44:00.000-04:002016-07-17T04:44:10.734-04:00nodejs expressjs http-proxy and the hanging POST<div dir="ltr" style="text-align: left;" trbidi="on">
here's one i came across recently with using http-proxy and expressjs. using the body-parser seems to mess with the way the object is sent to the backend (in this case, Spring Data REST). to resolve this, on the proxy part, i had to remove all the body-parser listeners (thanks to this issue solution <a href="https://github.com/nodejitsu/node-http-proxy/issues/180#issuecomment-215773710">https://github.com/nodejitsu/node-http-proxy/issues/180#issuecomment-215773710</a>)<br />
<br />
a very quick and simple solution, although maybe not optimal, it works.</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-15290716398840665302016-01-25T01:15:00.001-05:002016-01-25T01:15:39.334-05:00Eclipse Che and Spring Boot<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Eclipse Che and Spring Boot</h2>
<div>
<br /></div>
<div>
so, in playing around with Spring Boot on Eclipse Che, here's a couple points;</div>
<div>
<ul style="text-align: left;">
<li>when using the spring-boot-maven-plugin, you can run mvn spring-boot:run from the browser IDE</li>
<li>to view the application, use the link given from the docker app, but remove the app-name (so http://[your-ip]:[port-mapped-to-spring-boot]/[maven-name], should actually be http://[your-ip]:[port-mapped-to-spring-boot]/ )</li>
</ul>
<div>
<br /></div>
</div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-75429953937863069152016-01-25T00:34:00.001-05:002016-01-25T01:09:27.882-05:00Eclipse Che - Some Startup Notes<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Eclipse Che - Some Startup Notes</h2>
<div>
so Eclipse Che is a really cool idea to create "cloud-based" workspaces and a browser based IDE. It uses docker as a corner stone to the development lifecycle for workspaces and, in initial playing around, is pretty cool.</div>
<div>
<br /></div>
<div>
Some quick notes</div>
<div>
<ul style="text-align: left;">
<li>don't try and run it under root - create a new user, make sure they're a part of the docker group, and you're good</li>
<li>doesn't "look" nice in safari (there's a couple challenges with fonts and css sheets)</li>
<li>be patient with the workspace kick off, it pulls a docker image and that can take time - good candidate for "cacheing" on you server</li>
<li>when creating a Java class, create it as a full package resolution (so not "MyClass" but "io.example.MyClass" otherwise it will give you errors</li>
</ul>
<div>
Some links that helped</div>
</div>
<div>
<ul style="text-align: left;">
<li><a href="https://docs.docker.com/engine/installation/ubuntulinux/#create-a-docker-group">https://docs.docker.com/engine/installation/ubuntulinux/#create-a-docker-group</a></li>
</ul>
</div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-3301479886032867852016-01-24T00:07:00.002-05:002016-01-24T00:07:50.435-05:00Apache Geode (GemFire) in a Docker container<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Apache Geode (GemFire) in a Docker container</h2>
<br />
If you want to play around with geode in docker, try this...<br />
<br />
docker run -it apache geode/geode:1.0.0-incubating.M1.RC1 gosh<br />
<br />
<br /></div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com1tag:blogger.com,1999:blog-1588796972120532712.post-9011094110528066562016-01-17T03:47:00.000-05:002016-01-17T03:47:02.904-05:00weave + marathon - network<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
weave + marathon - network</h2>
<div>
quick note, if you're using weave on marathon with docker, make sure NETWORK is set to BRIDGE ("network":"bridge")</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-22798157277248068202016-01-15T22:31:00.001-05:002016-01-15T22:31:31.055-05:00mesos + marathon + docker - installing via the packages<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
mesos + marathon + docker - installing via the packages</h2>
<div>
a little trick to installing via the packages; if you follow <a href="https://open.mesosphere.com/getting-started/install/">https://open.mesosphere.com/getting-started/install/</a>, make sure you either proceed to the next steps and docker stuff, or add the following to /usr/lib/systemd/system/mesos-slave.service (centos 7)</div>
<div>
<br /></div>
<div>
<span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre;">Environment=MESOS_CONTAINERIZERS=docker,</span><span style="color: #333333; font-family: Consolas, Liberation Mono, Menlo, Courier, monospace;"><span style="font-size: 12px; white-space: pre;">mess</span></span></div>
<div>
<span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre;"><br /></span></div>
<div>
under the [Service] bracket.</div>
<div>
<br /></div>
<div>
without these steps, mesos won't know how to call docker to start the marathon submitted docker jobs.</div>
<div>
<br /></div>
<div>
(a key indicator of this problem is...)</div>
<div>
<br /></div>
<div>
<div style="background-color: black; color: whitesmoke; font-family: Monaco; font-size: 10px; line-height: normal;">
failed to start: None of the enabled containerizers (mesos) could create a container for the provided TaskInfo/ExecutorInfo message</div>
</div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-49185331853084634042016-01-03T05:00:00.002-05:002016-01-03T05:00:48.047-05:00docker on centos 7 and "cgroupsfs" error<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
docker on centos 7 and "cgroupsfs" error</h2>
<br />
here's a workaround on centos 7 for that very annoying "[8] System error: open /sys/fs/cgroup..." error...<br />
<br />
<a href="https://github.com/docker/docker/issues/17653#issuecomment-155609224">Random "Cannot start container" Errors on 1.9.0-rc5 CentOS7</a><br />
<br />
<br /></div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-91035690266893917412015-12-21T23:33:00.000-05:002015-12-21T23:33:00.615-05:00trick for marathon for running docker + weave<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
weave DNS trick</h2>
<div>
a little trick with weave and marathon is the specification of the hostname. unlike raw docker+weave, the hostname in weave DNS can be picked up by --name or --hostname. But with the marathon json, hostname <b>must have</b> .weave.local as a suffix. so, to deploy postgres via marathon and give it a weave DNS entry of postgres-server, the entry needs to be postures-server.weave.local</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-19028722384819728462015-12-15T11:55:00.000-05:002015-12-15T11:55:07.422-05:00mesos + marathon + docker + weave<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
mesos + marathon + docker + weave</h2>
<div>
so here's a little configuration set of links for standing up a PaaS leveraging mesos, marathon, docker and weave (am using centos 7 on a VM);</div>
<div>
<br /></div>
<div>
<ol style="text-align: left;">
<li>follow the install of the base platform here --> <a href="https://open.mesosphere.com/getting-started/install/">https://open.mesosphere.com/getting-started/install/</a></li>
<li>install docker from here --> <a href="https://docs.docker.com/engine/installation/centos/">https://docs.docker.com/engine/installation/centos/</a></li>
<li>use this weave script from here --> <a href="https://github.com/weaveworks/guides/blob/master/mesos-marathon/centos/weave">https://github.com/weaveworks/guides/blob/master/mesos-marathon/centos/weave</a></li>
<li>use these service scripts in here --> <a href="https://github.com/weaveworks/guides/tree/master/mesos-marathon/centos">https://github.com/weaveworks/guides/tree/master/mesos-marathon/centos</a></li>
<li>but <b>most</b> importantly, add the following to /usr/lib/systemd/system/mesos-slave.service</li>
</ol>
Environment=MESOS_CONTAINERIZERS=docker,mesos<br />Environment=MESOS_DOCKER_SOCKET=/var/run/weave/weave.sock</div>
<div>
<br /></div>
<div>
now you can deploy normally with marathon and have your containers picked up in weave (and mapped)</div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-82507010575968264542015-09-17T02:59:00.000-04:002015-09-17T02:59:15.629-04:00Spring YARN and Hortonworks Sandbox<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Spring YARN and Hortonworks Sandbox</h2>
<div>
<br /></div>
<div>
after much trial and error, here's some notes on getting Spring YARN to submit a remote job to Hortonworks sandbox...</div>
<div>
<ol style="text-align: left;">
<li>if working "remotely" (launching YARN job from one machine into the sandbox) make sure your local /etc/hosts is set to resolve sandbox.hortonworks.com on your target machine IP</li>
<li>the ResourceManager port on HDP is 8050, not the default 8032 (spring.hadoop.resourceManagerPort: 8050)</li>
<li>when running the job, use "HADOOP_USER_NAME=hdfs java -jar [your jar file]</li>
</ol>
<div>
<br /></div>
</div>
<div>
<br /></div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-28324269727306623072015-08-23T06:47:00.002-04:002015-08-23T06:47:57.543-04:00Kafka on Docker on Photon with AppCatalyst<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Kafka on Docker on Photon with AppCatalyst</h2>
<div>
so, something to note with AppCatalyst; the Photon VMs are very small (memory-wise). as such, spooling up some containers, like spotify/kafka, won't start. so here's a simple one;</div>
<div>
<br /></div>
<div>
sudo docker run -d --name other_kafka -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=localhost --env ADVERTISED_PORT=9092 --env KAFKA_HEAP_OPTS="-Xmx256M -Xms128M" spotify/kafka</div>
<div>
<br /></div>
<div>
the memory settings help get it off the ground on appcatalyst-photon.</div>
<div>
<br /></div>
<div>
(which kind of goes against the 12 factor grain of "close-to-production" as possible given the docker script is altered to fit the VM...)</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-51592931049162369502015-08-15T13:41:00.001-04:002015-08-15T13:41:40.869-04:00new EFF sponsored certificate authorityhttp://letsencrypt.org is coming in Q4 2015 with platinum sponsors including the EFF and Mozilla. The aim is to provide an automated and free certificate authority and encourage wide spread adoption of TLS.<div><br></div><div>should be a nice alternative to self-signed CA's</div>random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0tag:blogger.com,1999:blog-1588796972120532712.post-27075510877648981882015-07-28T23:57:00.002-04:002015-07-28T23:57:47.335-04:00docker & weave & photon<div dir="ltr" style="text-align: left;" trbidi="on">
Putting Docker, Weave and Photon together<br />
<br />
<br />
<ol style="text-align: left;">
<li>appcatalyst vm create [your vm name]</li>
<li>appcatalyst vmpower on [your vm name]</li>
<li>(wait... 10 seconds or so)</li>
<li>appcatalyst guest getip [your vm name]</li>
<li>ssh -i /opt/vmware/appcatalyst/etc/appcatalyst_insecure_ssh_key photon@[ip_address]</li>
</ol>
<div>
now you're in the VM, let's get weave</div>
<div>
<br /></div>
<div>
<ol style="text-align: left;">
<li>sudo curl -L git.io/weave -O /usr/local/bin/weave</li>
<li>sudo chmod a+x /usr/local/bin/weave</li>
<li>sudo -s</li>
<li>/usr/local/bin/weave launch</li>
<li>/usr/local/bin/weave launch-dns</li>
<li>/usr/local/bin/weave launch-proxy</li>
<li>eval $(/usr/local/bin/weave proxy-env)</li>
</ol>
<div>
now you can run docker commands have weave play "nice" (dynamic mapping of --name to weaveDNS, etc.)</div>
</div>
<div>
<br /></div>
<div>
<a href="https://github.com/weaveworks/weave#readme">https://github.com/weaveworks/weave#readme</a></div>
<div>
<a href="https://communities.vmware.com/community/vmtn/devops/vmware-appcatalyst">https://communities.vmware.com/community/vmtn/devops/vmware-appcatalyst</a></div>
<div>
<br /></div>
</div>
random_coderhttp://www.blogger.com/profile/07631514923079125638noreply@blogger.com0