<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator><link href="https://ahmetkizilay.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://ahmetkizilay.com/" rel="alternate" type="text/html" /><updated>2019-06-29T15:05:42+00:00</updated><id>https://ahmetkizilay.com/feed.xml</id><entry xml:lang="tr"><title type="html">HTTPS destekli haber siteleri [TR]</title><link href="https://ahmetkizilay.com/2016/11/07/https-destekli-haber-siteleri.html" rel="alternate" type="text/html" title="HTTPS destekli haber siteleri [TR]" /><published>2016-11-07T00:00:00+00:00</published><updated>2016-11-07T00:00:00+00:00</updated><id>https://ahmetkizilay.com/2016/11/07/https-destekli-haber-siteleri</id><content type="html" xml:base="https://ahmetkizilay.com/2016/11/07/https-destekli-haber-siteleri.html">&lt;h3 id=&quot;https-destekli-haber-siteleri-tr&quot;&gt;HTTPS destekli haber siteleri [TR]&lt;/h3&gt;

&lt;p&gt;Türkiye’deki haber sitelerinin HTTPS desteklerini inceleyip, HTTPS üzerinden yayın yapmanın hem daha güvenli hem de sansür mekanizmalarına karşı bir tepki olarak kullanabileceğine dair bir yazı hazırladım.&lt;/p&gt;

&lt;p&gt;Yazının tamamını &lt;a href=&quot;https://medium.com/graph-commons/t%C3%BCrkiyenin-sans%C3%BCre-ve-g%C3%B6zetime-uygun-haber-siteleri-2e8a928401d3#.b9t2jnfz0&quot;&gt;Medium&lt;/a&gt;‘da okuyabilirsiniz.&lt;/p&gt;</content><author><name></name></author><category term="opinion," /><category term="security," /><category term="journalism," /><category term="censorship," /><category term="turkish" /><summary type="html">Türkiye'nin sansüre ve gözetime elverişli sitelerini inceledik.</summary></entry><entry xml:lang="en"><title type="html">Setting up GitLab Runner For Continuous Integration</title><link href="https://ahmetkizilay.com/2016/03/01/tutorial-gitlab-runner.html" rel="alternate" type="text/html" title="Setting up GitLab Runner For Continuous Integration" /><published>2016-03-01T00:00:00+00:00</published><updated>2016-03-01T00:00:00+00:00</updated><id>https://ahmetkizilay.com/2016/03/01/tutorial-gitlab-runner</id><content type="html" xml:base="https://ahmetkizilay.com/2016/03/01/tutorial-gitlab-runner.html">&lt;h3 id=&quot;setting-up-gitlab-runner-for-continuous-integration&quot;&gt;Setting up GitLab Runner For Continuous Integration&lt;/h3&gt;

&lt;p&gt;I wrote a tutorial on GitLab blog about how to get started with GitLab Runner.&lt;/p&gt;

&lt;p&gt;In the post, I walk through a sample NodeJS application to configure a Gitlab
project to run tests with every push.&lt;/p&gt;

&lt;p&gt;Read the article &lt;a href=&quot;https://about.gitlab.com/2016/03/01/gitlab-runner-with-docker/&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</content><author><name></name></author><category term="gitlab," /><category term="docker," /><category term="continuous" /><category term="integration," /><category term="tutorial," /><summary type="html">A tutorial on getting started with GitLab Runner for CI.</summary></entry><entry xml:lang="en"><title type="html">Integration testing with dockerized Selenium and Capybara</title><link href="https://ahmetkizilay.com/2016/02/07/dockerized-selenium-testing-with-capybara.html" rel="alternate" type="text/html" title="Integration testing with dockerized Selenium and Capybara" /><published>2016-02-07T00:00:00+00:00</published><updated>2016-02-07T00:00:00+00:00</updated><id>https://ahmetkizilay.com/2016/02/07/dockerized-selenium-testing-with-capybara</id><content type="html" xml:base="https://ahmetkizilay.com/2016/02/07/dockerized-selenium-testing-with-capybara.html">&lt;h3 id=&quot;integration-testing-with-dockerized-selenium-and-capybara&quot;&gt;Integration testing with dockerized Selenium and Capybara&lt;/h3&gt;

&lt;p&gt;In most cloud-based CI providers such as Travis or Codeship, there is support for Firefox and Chrome browsers out of the box. Surely this is very convenient as Karma or Capybara runners will work painlessly during testing.&lt;/p&gt;

&lt;p&gt;My Continuous Integration workflow, however, lives entirely in Docker, so my test runner does not have access to the browser on the host system. One solution is to use PhantomJS, but I kept bumping into some unsupported operation errors with it for some third-party Javascript libraries. So, I believe working with Selenium is less painful and more reliable.&lt;/p&gt;

&lt;p&gt;Below I demonstrate how to setup and configured my Rails app to run integration tests on a windowless browser using docker-compose.&lt;/p&gt;

&lt;p&gt;To begin, Capybara works with default Firefox installation with no extra effort at all. Here is a sample integration test:
&lt;script src=&quot;https://gist.github.com/ahmetkizilay/d6c3b42fa4b741a81d1c.js?file=one.rb&quot;&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;With docker-compose, I will create two containers, one for my Rails app, and one for the Selenium Firefox browser. These two containers will run on the same Docker network and they will be able to communicate with each other over this private bridge network.&lt;/p&gt;

&lt;p&gt;Here is the docker-compose.yml file:
&lt;script src=&quot;https://gist.github.com/ahmetkizilay/d6c3b42fa4b741a81d1c.js?file=two.yml&quot;&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;I will simply test with the Firefox browser, so I do not need to set up a Selenium grid. Stand-alone Firefox image will be enough.&lt;/p&gt;

&lt;p&gt;Now, I need to configure and register the Capybara driver in my &lt;code class=&quot;highlighter-rouge&quot;&gt;rails_helper.rb&lt;/code&gt; file. Since the Selenium container will be on a different IP than my app, the driver needs to be configured for remote.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/d6c3b42fa4b741a81d1c.js?file=three.rb&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;setup_driver&lt;/code&gt; is a convenience method I will use before my tests to set the remote Selenium browser. So, I add it to the start of my test.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/d6c3b42fa4b741a81d1c.js?file=four.rb&quot;&gt;&lt;/script&gt;

&lt;p&gt;Thanks to the Docker bridge networking, both containers will be assigned an IP and a host name, and they will have access to each other over the network. I pass the addresses of the containers as environment variables in the &lt;code class=&quot;highlighter-rouge&quot;&gt;start-tests.sh&lt;/code&gt; file. For convenience, the container_name is set as the host name in the network, so I can simply use it in the script file.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/d6c3b42fa4b741a81d1c.js?file=five.sh&quot;&gt;&lt;/script&gt;

&lt;p&gt;Note that, since networking feature was experimental up until version 1.6, you need to pass &lt;code class=&quot;highlighter-rouge&quot;&gt;--x-networking&lt;/code&gt; flag for earlier versions of docker-compose.
&lt;br /&gt;
&lt;br /&gt;
With this setup, I can seamlessly run my unit as well as integration tests inside my Docker workflow with Gitlab runner on my private server. I hope you also find it useful. For any questions or comments, feel free to get in touch by writing a comment below or sending me a tweet  &lt;a href=&quot;https://twitter.com/ahmetkizilay&quot;&gt;@ahmetkizilay&lt;/a&gt;. Enjoy!&lt;/p&gt;</content><author><name></name></author><category term="docker," /><category term="capybara," /><category term="selenium," /><category term="testing" /><summary type="html">Setting up integration testing with docker-compose.</summary></entry><entry xml:lang="en"><title type="html">Dockerizing a Neo4j instance with an extension</title><link href="https://ahmetkizilay.com/2016/02/02/dockerizing-neo4j-with-extension.html" rel="alternate" type="text/html" title="Dockerizing a Neo4j instance with an extension" /><published>2016-02-02T00:00:00+00:00</published><updated>2016-02-02T00:00:00+00:00</updated><id>https://ahmetkizilay.com/2016/02/02/dockerizing-neo4j-with-extension</id><content type="html" xml:base="https://ahmetkizilay.com/2016/02/02/dockerizing-neo4j-with-extension.html">&lt;h3 id=&quot;dockerizing-a-neo4j-instance-with-an-extension&quot;&gt;Dockerizing a Neo4j instance with an extension&lt;/h3&gt;

&lt;p&gt;In this post I will demonstrate how to setup a Neo4j container with an existing database and a custom extension that synchronizes data with an Elastic Search instance. The extension I am using is a fork of &lt;a href=&quot;https://github.com/neo4j-contrib/neo4j-elasticsearch&quot;&gt;this project&lt;/a&gt; on GitHub.&lt;/p&gt;

&lt;p&gt;To get started, pull the 2.3.2 tag of Neo4j image. Some functionality I will explain later in the post depend on this version (and up).&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/111e145b2250db2257be.js?file=one.sh&quot;&gt;&lt;/script&gt;

&lt;h4 id=&quot;adding-volumes&quot;&gt;Adding volumes&lt;/h4&gt;
&lt;p&gt;Volumes are a way to persist data across several invocations of a container by mapping directories from the host file system to the container. For this Neo4j instance, I will need to add three volume definitions.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;data volume: This is the &lt;code class=&quot;highlighter-rouge&quot;&gt;data&lt;/code&gt; folder inside neo4j installation which containing the &lt;code class=&quot;highlighter-rouge&quot;&gt;graph.db&lt;/code&gt; directory which actually holds the database files.&lt;/li&gt;
  &lt;li&gt;plugins volume: the elastic search extension has some jar files that should go to the plugins folder of Neo4j.&lt;/li&gt;
  &lt;li&gt;extension volume: This is my custom volume that contains a script file to be run before Neo4j starts. Note that this mapping will create a new directory in the Neo4j container. Therefore, it is important to select a directory name that will not break anything in the installation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4 id=&quot;before-start-hook&quot;&gt;Before-Start Hook&lt;/h4&gt;
&lt;p&gt;With 2.3.2 Neo4j image, I can use &lt;code class=&quot;highlighter-rouge&quot;&gt;EXTENSION_SCRIPT&lt;/code&gt; environment variable to specify a script file to execute before Neo4j starts. The Elastic Search extension needs two parameters to be set in &lt;code class=&quot;highlighter-rouge&quot;&gt;neo4j.properties&lt;/code&gt; file, so I will create a script that concatenates two lines to the end of the file.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/111e145b2250db2257be.js?file=two.sh&quot;&gt;&lt;/script&gt;

&lt;p&gt;I know that Neo4j is installed in &lt;code class=&quot;highlighter-rouge&quot;&gt;/var/lib/neo4j&lt;/code&gt; and it is OK to create a directory named &lt;code class=&quot;highlighter-rouge&quot;&gt;extension&lt;/code&gt;. So, my command looks like this:
&lt;script src=&quot;https://gist.github.com/ahmetkizilay/111e145b2250db2257be.js?file=three.sh&quot;&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;As a bonus, I can add service definitions for Neo4j and Elastic Search in a docker-compose file for easier networking and maintainability.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/111e145b2250db2257be.js?file=four.yml&quot;&gt;&lt;/script&gt;

&lt;p&gt;Now, running docker-compose with &lt;code class=&quot;highlighter-rouge&quot;&gt;--x-networking&lt;/code&gt; flag will create two containers with &lt;code class=&quot;highlighter-rouge&quot;&gt;container_name&lt;/code&gt; as their host names.&lt;/p&gt;

&lt;p&gt;As a second bonus, I can modify my extension script to make sure the Elastic Search container starts before Neo4j does, so that I will not get any Connection Refused errors on startup.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/111e145b2250db2257be.js?file=five.sh&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;
In this post, I showed how to setup a Neo4j instance with access to an Elastic Search service over the Docker network. For any questions or comments, feel free to get in touch by writing a comment below or sending me a tweet  &lt;a href=&quot;https://twitter.com/ahmetkizilay&quot;&gt;@ahmetkizilay&lt;/a&gt;. Enjoy!&lt;/p&gt;</content><author><name></name></author><category term="neo4j," /><category term="docker," /><category term="elasticsearch" /><summary type="html">Setting up neo4j docker image to work with an unmanaged extension</summary></entry><entry xml:lang="en"><title type="html">Using Neo4j to create graphs for Graph Commons</title><link href="https://ahmetkizilay.com/2015/08/21/tutorial-neo4j-gc.html" rel="alternate" type="text/html" title="Using Neo4j to create graphs for Graph Commons" /><published>2015-08-21T00:00:00+00:00</published><updated>2015-08-21T00:00:00+00:00</updated><id>https://ahmetkizilay.com/2015/08/21/tutorial-neo4j-gc</id><content type="html" xml:base="https://ahmetkizilay.com/2015/08/21/tutorial-neo4j-gc.html">&lt;h3 id=&quot;using-neo4j-to-create-graphs-for-graph-commons&quot;&gt;Using Neo4j to create graphs for Graph Commons&lt;/h3&gt;

&lt;p&gt;I recently wrote a tutorial on Graph Commons blog about how to generate CSV output
from the Neo4j query browser to create graphs on Graph Commons.&lt;/p&gt;

&lt;p&gt;Along with a real use-case scenario, I give some tips on tuning and sharing graphs with Graph Commons.&lt;/p&gt;

&lt;p&gt;Read the article &lt;a href=&quot;http://blog.graphcommons.com/generate-graphs-for-gc-with-neo4j/&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</content><author><name></name></author><category term="neo4j," /><category term="Graph" /><category term="Commons," /><category term="tutorial," /><summary type="html">This is a tutorial on generating CSV graph files for Graph Commons with Neo4j</summary></entry><entry><title type="html">Using Neo4j as a Docker container</title><link href="https://ahmetkizilay.com/2015/07/15/using-neo4j-with-docker.html" rel="alternate" type="text/html" title="Using Neo4j as a Docker container" /><published>2015-07-15T00:00:00+00:00</published><updated>2015-07-15T00:00:00+00:00</updated><id>https://ahmetkizilay.com/2015/07/15/using-neo4j-with-docker</id><content type="html" xml:base="https://ahmetkizilay.com/2015/07/15/using-neo4j-with-docker.html">&lt;h3 id=&quot;using-neo4j-as-a-docker-container&quot;&gt;Using Neo4j as a Docker container&lt;/h3&gt;

&lt;p&gt;After working with Neo4j for some projects, I am convinced that I would rather keep different data sets isolated from each other. Normally this can be done by copying database folders into Neo4j installation folder etc. However, I find dockerizing Neo4j to be a lot more practical to separate my data sets. With Neo4j running inside a Docker container, it gets very easy to switch between data sets (or even use them at the same time).&lt;/p&gt;

&lt;p&gt;Below are some tips on how to get started and configure Neo4j in a Docker container.&lt;/p&gt;

&lt;h4 id=&quot;selecting-an-image&quot;&gt;selecting an image&lt;/h4&gt;
&lt;p&gt;A quick search on Docker Hub for Neo4j will bring so many results to pick from. I personally use &lt;a href=&quot;https://registry.hub.docker.com/u/tpires/neo4j/&quot;&gt;tpires/neo4j&lt;/a&gt; image, which happens to be one of the images mentioned in Neo4j developer &lt;a href=&quot;http://neo4j.com/developer/docker/&quot;&gt;site&lt;/a&gt;. This post will contain commands that are specific to this image. However, it should be straight forward to apply these commands to any other images out there.&lt;/p&gt;

&lt;p&gt;Download the image with the following command, if you haven't so already:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/e20fa667d35a2671e645.js?file=first.sh&quot;&gt;&lt;/script&gt;

&lt;h4 id=&quot;authentication&quot;&gt;authentication&lt;/h4&gt;
&lt;p&gt;By version 2.2, neo4j introduced token-based authentication which is enabled by default. That is actually not too bad, but it might be frustrating for your development and test environment where you might want to automate creating and deleting neo4j instances.&lt;/p&gt;

&lt;p&gt;You can pass authentication credentials as an environment variable when you create your neo4j image. To set username and password, use the following sample command.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/e20fa667d35a2671e645.js?file=auth-tokens.sh&quot;&gt;&lt;/script&gt;

&lt;p&gt;Username and password information are stored in the &lt;code class=&quot;highlighter-rouge&quot;&gt;dbms/auth&lt;/code&gt; file in the Neo4j installation directory. As the container is created, this file is modified to include your credentials before Neo4j starts.&lt;/p&gt;

&lt;p&gt;Alternatively, you can bypass the authentication altogether with the following command.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/e20fa667d35a2671e645.js?file=auth-none.sh&quot;&gt;&lt;/script&gt;

&lt;p&gt;With this option, &lt;code class=&quot;highlighter-rouge&quot;&gt;dbms.security.auth_enabled=false&lt;/code&gt; line is appended to the conf/neo4j-server.properties file which disables token-based authentication.&lt;/p&gt;

&lt;h4 id=&quot;data-persistence&quot;&gt;Data persistence&lt;/h4&gt;
&lt;p&gt;You can designate a directory in your host environment to store your data locally and point it to your Docker container to be used by Neo4j.
Neo4j keeps data in the &lt;code class=&quot;highlighter-rouge&quot;&gt;data/graph.db&lt;/code&gt; folder and for this particular image we are using, the path for Neo4j is &lt;code class=&quot;highlighter-rouge&quot;&gt;var/lib/neo4j&lt;/code&gt;. So, the following command will map your local directory to the Neo4j database directory.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ahmetkizilay/e20fa667d35a2671e645.js?file=volumes.sh&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;In summary, it is pretty straight-forward to containerize Neo4j in your local development environment. I find this approach to be a very practical way to keep my projects isolated and to quickly run some queries without tainting my existing data.&lt;/p&gt;</content><author><name></name></author><category term="neo4j," /><category term="docker" /><summary type="html">some tips for running Neo4j as a Docker container</summary></entry></feed>