<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arne</title>
    <description>The latest articles on DEV Community by Arne (@ophasnoname).</description>
    <link>https://dev.to/ophasnoname</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F9513%2F1StoOkzg.jpg</url>
      <title>DEV Community: Arne</title>
      <link>https://dev.to/ophasnoname</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ophasnoname"/>
    <language>en</language>
    <item>
      <title>How to create a Elixir release and use environment variables configured at runtime.</title>
      <dc:creator>Arne</dc:creator>
      <pubDate>Sun, 27 Jan 2019 06:23:29 +0000</pubDate>
      <link>https://dev.to/ophasnoname/how-to-create-a-elixir-release-and-use-environment-variables-configured-at-runtime-31k4</link>
      <guid>https://dev.to/ophasnoname/how-to-create-a-elixir-release-and-use-environment-variables-configured-at-runtime-31k4</guid>
      <description>&lt;p&gt;First things first, please indulge me, this is not my mother tongue!&lt;/p&gt;

&lt;p&gt;One of the problems we are facing with every new application is the proper usage of &lt;a href="https://elixir-lang.org/"&gt;Elixir&lt;/a&gt; with the possibility to use environment variables from a “docker-compose” file to configure the application at runtime.&lt;/p&gt;

&lt;p&gt;There a several approaches to do this, but i want to show you my preffered way with Distillery and the “configTuples” Provider.&lt;/p&gt;

&lt;p&gt;This combination allows us to build a new release and set configuration parameters like Database credentials at runtime.&lt;/p&gt;

&lt;p&gt;I will guide you through one simple example, we will create a new Elixir application, add the nessecary config provider and run/build it with &lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create our example application
&lt;/h2&gt;

&lt;p&gt;Lets create a new application, I will call it “fuchsbau” … don’t ask me why :-)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mix new fuchsbau --module Fuchsbau
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;We will add some stupid code to echo a bunch of example environment variables (just to verify that this approach is working as expected).

## Example code to test environment variables

Create a new file “../lib/starter.ex” with the following content, to echo our configuration.

defmodule Starter do
   use Application

  def start(_type, _args) do
    IO.puts("... hey fuchsbau")
    Starter.echo_variables
  end

  @doc """
    Echo defined environment variables from config.exs
  """
  def echo_variables do 
    owner = Application.get_env(:fuchsbau, :config)[:fuchsbau_owner]
    street =  Application.get_env(:fuchsbau, :config)[:fuchsbau_street]
    phone =  Application.get_env(:fuchsbau, :config)[:fuchsbau_phone]

    IO.inspect(owner)
    IO.inspect(street)
    IO.inspect(phone)

    {:ok, self()}
  end

end

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;To run this code we have to add it to our “mix.exs”&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; # Run "mix help compile.app" to learn about applications.
  def application do
    [  
      mod: {Starter, []},
      extra_applications: [:logger]
    ]
  end

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Add examples to config.exs
&lt;/h2&gt;

&lt;p&gt;To have some config variables for our test, please add some config values to your config.exs.&lt;/p&gt;

&lt;p&gt;In a “real- world” example we would use different configs like “prod.exs” .. but for this short how to, it should be fine to just use config.exs&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;config :fuchsbau, :config,
  fuchsbau_owner: {:system, "FUCHSBAU_OWNER", default: "Anonymous"},
  fuchsbau_street: {:system, "FUCHSBAU_STREET", default: "Somewhere..."},
  fuchsbau_phone: {:system, "FUCHSBAU_PHONE", default: 67282929, type: :integer}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Use Distillery and ConfigTuples Provider
&lt;/h2&gt;

&lt;p&gt;Here is the interesting part, you have to add Distillery and configTuples to your application (mix.exs).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;defp deps do
    [
      {:distillery, "~&amp;gt; 2.0"},
      {:config_tuples, "~&amp;gt; 0.2.0"}
    ]
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;At your command line, run the following to get the new dependencies and to init the release (this will create a new directory “/rel” with a config.exs file we need to setup configTuples):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mix deps.get
$ mix release.init
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;To make use of the new config provider, add it to “/rel/config.exs”&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;release :fuchsbau do
  set version: current_version(:fuchsbau)
  set applications: [
    :runtime_tools
  ]
  # ConfigTuples Provider !
  set config_providers: [
    ConfigTuples.Provider
  ]
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Time for the first Test
&lt;/h2&gt;

&lt;p&gt;Thats all to use Distillery and the ConfigTuples provider (don’t worry we will continue with the Docker stuff in just a couple of minutes..)&lt;/p&gt;

&lt;p&gt;Let’s try our release run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mix release
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You will see some examples to start the release, just use the one with “foreground”.. and hell yes .. i have to use Windows, forgot my MacBook at work..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--posuz3Ih--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wzvbydxj97fhro2f1rf5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--posuz3Ih--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wzvbydxj97fhro2f1rf5.PNG" alt="Elixir Release"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After running your release, you should see the defined config values.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xyb3uUYB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lom3xonirpy22mum5f4y.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xyb3uUYB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lom3xonirpy22mum5f4y.PNG" alt="Elixir running release"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To verify that we are able to set environment variables at runtime, try the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ export FUCHSBAU_OWNER=Medium
$ _build/dev/rel/fuchsbau/bin/fuchsbau foreground
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This will output “Medium” as owner of the Fuchsbau!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NVAhYqHE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/c3cl2oebfy9dagppe9bh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NVAhYqHE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/c3cl2oebfy9dagppe9bh.PNG" alt="elixir"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Docker to build and run our application
&lt;/h2&gt;

&lt;p&gt;The last step for this how to: We will create a Dockerfile to build our application and to run it.&lt;/p&gt;

&lt;p&gt;Create a new file: “Dockerfile” in your project root with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM bitwalker/alpine-elixir:1.7 as build

# Copy the source folder into the Docker image
COPY . .

# Install dependencies and build Release
RUN export MIX_ENV=prod &amp;amp;&amp;amp; \
    rm -Rf _build &amp;amp;&amp;amp; \
    mix deps.get &amp;amp;&amp;amp; \
    mix release

# Extract Release archive to /rel for copying in next stage, please change the application name 
RUN APP_NAME="fuchsbau" &amp;amp;&amp;amp; \
    RELEASE_DIR=`ls -d _build/prod/rel/$APP_NAME/releases/*/` &amp;amp;&amp;amp; \
    mkdir /export &amp;amp;&amp;amp; \
    tar -xf "$RELEASE_DIR/$APP_NAME.tar.gz" -C /export

# Deplyment
FROM pentacent/alpine-erlang-base:latest

# Copy and extract .tar.gz 
COPY --from=build /export/ .


# Set default entrypoint and command
ENTRYPOINT ["/opt/app/bin/fuchsbau"]
CMD ["foreground"]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This Dockerfile will create a new Image with Alpine as base. Let’s test it with a changed value for our “FUCHSBAU_OWNER” environment variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t fuchsbau .
docker run -e FUCHSBAU_OWNER=FridayIsMyDay fuchsbau
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tsgM52RJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/phpks1o2xv6qwz9lv0i1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tsgM52RJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/phpks1o2xv6qwz9lv0i1.PNG" alt="Elixir Docker"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to get the sources for this example, feel free: &lt;a href="https://github.com/opHASnoNAME/elixir-docker-envs"&gt;https://github.com/opHASnoNAME/elixir-docker-envs&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;To host your application i would suggest &lt;a href="https://m.do.co/c/d155e881c080"&gt;DigitalOcean&lt;/a&gt;, works like a charm for my projects.&lt;/p&gt;

&lt;p&gt;1st Published at Medium: &lt;a href="https://medium.com/@ophasnoname_44358/how-to-create-a-elixir-release-and-use-environment-variables-configured-at-runtime-dbb2580ba42d"&gt;Visit&lt;/a&gt;&lt;/p&gt;

</description>
      <category>elixir</category>
      <category>erlang</category>
      <category>docker</category>
    </item>
    <item>
      <title>How to publish UDP ports with Docker-Swarm</title>
      <dc:creator>Arne</dc:creator>
      <pubDate>Thu, 26 Oct 2017 16:09:02 +0000</pubDate>
      <link>https://dev.to/ophasnoname/how-to-publish-udp-ports-with-docker-swarm-688</link>
      <guid>https://dev.to/ophasnoname/how-to-publish-udp-ports-with-docker-swarm-688</guid>
      <description>

&lt;p&gt;I am sure you know those requests, where you think: Hey no problem, i have done this thousand times, give me 5 minutes and it will work.&lt;/p&gt;

&lt;p&gt;The same happened last week, when a teammate from &lt;a href="https://zenner-iot.com"&gt;zisops&lt;/a&gt; asked me to publish a UDP Port for a already running Docker Swarm Service. I have done this 100 times before for "normal" Docker Containers. But hey.. Docker Swarm can't handle this with:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-p 500:500/udp
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Ok next step: RTFM but hey.. nothing about publishing a UDP Port for a service. Next try: Start to google.. Gotcha, found a solutions in an Github Issue from the Moby Project. So if you ever have to use UDP with Docker-Swarm remember this small article, and buy me a beer :-)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Solution&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker service create --name my_service \
    --publish mode=host,published=500,target=5004,protocol=udp \
    my_image
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Original post in german: &lt;a href="https://www.geekpub.de/2017/10/docker-swarm-udp-port-freigeben-fuer-einen-service/"&gt;https://www.geekpub.de/2017/10/docker-swarm-udp-port-freigeben-fuer-einen-service/&lt;/a&gt;&lt;/p&gt;


</description>
      <category>docker</category>
      <category>dockerswarm</category>
      <category>udp</category>
    </item>
    <item>
      <title>Auth0 with Laravel 5.4 including saving the user </title>
      <dc:creator>Arne</dc:creator>
      <pubDate>Thu, 10 Aug 2017 05:17:41 +0000</pubDate>
      <link>https://dev.to/ophasnoname/auth0-with-laravel-54-including-saving-the-user</link>
      <guid>https://dev.to/ophasnoname/auth0-with-laravel-54-including-saving-the-user</guid>
      <description>&lt;p&gt;Disclaimer: Sorry for my english, not my mother tongue.. but i try my best.&lt;/p&gt;

&lt;p&gt;Vacation after I managed to recover from Wacken 2017, the rest of the time is once again put into some fun with PHP and Laravel.&lt;/p&gt;

&lt;p&gt;For a small project where a user administration is necessary, I was recently recommended by a colleague the service auth0.&lt;/p&gt;

&lt;p&gt;What is &lt;a href="https://auth0.com"&gt;auth0&lt;/a&gt;? It takes you all the effort to include various authentication providers such as Facebook, Google, Github, and so on. In the free version somewhat limited, but for a beginning more than sufficient (7000 User, 2 Provider).&lt;/p&gt;

&lt;p&gt;Well now it was time to connect my Laravel application to auth0. The documentation is quite good (also related to the integration in Laravel) but when i tried to save the users into my own databases, the examples did not work. So if you have to accomplish the same task, or if i have to do it again.. here comes a small tutorial.&lt;/p&gt;

&lt;p&gt;As a starting point, let’s assume:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Laravel 5.4 application works, and the migrations for the users (are already there) were executed&lt;/li&gt;
&lt;li&gt;Auth0 account is set up&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For the most times we will follow their &lt;a href="https://auth0.com/docs/quickstart/webapp/laravel"&gt;documentation&lt;/a&gt;, with some small changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrate Auth0 in Laravel 5.4
&lt;/h2&gt;

&lt;p&gt;In your project directory, we install us first the right package for Auth0&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require auth0/login:"~5.0"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now change your: /config/app.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
'providers' =&amp;gt; array(
    Auth0\Login\LoginServiceProvider::class,
);
'aliases'array( 
    'Auth0' =&amp;gt; Auth0\Login\Facade\Auth0::class 
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we differ from the documentation, since we want to save our users in our databases. For this we build a UserRepository: /app/Repository/UserRepository.php with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
namespace App\Repository;
use Auth0\Login\Contract\Auth0UserRepository as Auth0UserRepository;
use App\User as User;
class UserRepository implements Auth0UserRepository {
    public function getUserByDecodedJWT($jwt)
    {
        $jwt-&amp;gt;user_id = $jwt-&amp;gt;sub;
        return $this-&amp;gt;upsertUser($jwt);
    }
    public function getUserByUserInfo($userInfo)
    {
        return $this-&amp;gt;upsertUser((object) $userInfo['profile']);
    }
    /**
     * Check if user is in database, if not create.
     * 
     * @return User 
     */
    protected function upsertUser($profile) {
        $user = User::where("auth0id", $profile-&amp;gt;user_id)-&amp;gt;first();
        // create user if not in database
        if ($user === null) {
            $user = new User();
            $user-&amp;gt;email = $profile-&amp;gt;email;
            $user-&amp;gt;auth0id = $profile-&amp;gt;user_id;
            $user-&amp;gt;name = $profile-&amp;gt;name;
            // random password, we dont need it 
            $user-&amp;gt;password = md5(time());
            $user-&amp;gt;save();
        }
        return $user;
    }
    public function getUserByIdentifier($identifier)
    {
        //Get the user info of the user logged in (probably in session)
        $user = \App::make('auth0')-&amp;gt;getUser();
        if ($user === null) return null;
        // build the user
        $user = $this-&amp;gt;getUserByUserInfo($user);
        // it is not the same user as logged in, it is not valid
        if ($user &amp;amp;&amp;amp; $user-&amp;gt;id == $identifier) {
            return $user;
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We do not set a password, the login is managed via auth0. &lt;strong&gt;&lt;em&gt;What you still have to do is to insert the column auth0id in the user table&lt;/em&gt;&lt;/strong&gt;, which of course, Laravel does not know before. The ID is used for the assignment.&lt;/p&gt;

&lt;p&gt;The repository will now be registered in our AppServiceProvider: /app/Providers/AppServiceProvider.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
   /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        $this-&amp;gt;app-&amp;gt;bind(
          Auth0UserRepositoryContract::class,
          UserRepository::class // das unser Repository - in der Doku wird Auth0Repo.. genutzt
        );
    }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now it goes to the configuration. For this, we create the necessary configuration files, and also set the necessary routes for the service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan vendor:publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;File: /routes/web.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Route::get('/login', ['as' =&amp;gt; 'login', 'uses' =&amp;gt; 'IndexController@login']);
Route::get('/logout', ['as' =&amp;gt; 'logout', 'uses' =&amp;gt; 'IndexController@logout']);
Route::get('/callback', '\Auth0\Login\Auth0Controller@callback');

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The functions in the IndexController are as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

    public function index() 
    {
        $isLoggedIn = \Auth::check();

        return view('index')
              -&amp;gt;with('isLoggedIn', $isLoggedIn)
              -&amp;gt;with('user', \Auth::user());
    }

    public function login()
    {
        return \App::make('auth0')-&amp;gt;login();
    }

    public function logout()
    {
        \Auth::logout();
        return \Redirect::intended('/');
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So it is already clear, how you later access the user data: &lt;strong&gt;&lt;em&gt;\Auth::user();&lt;/em&gt;&lt;/strong&gt; Now we need to include auth0 as userprovider: /app/config/auth.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    'providers' =&amp;gt; [
        'users' =&amp;gt; [
            'driver' =&amp;gt; 'auth0',
        ],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Settings for the application
&lt;/h2&gt;

&lt;p&gt;To get the necessary parameters for our configuration, we visit the website of Auth0. You have to create a basic web application there, and set the following URLs.&lt;/p&gt;

&lt;p&gt;-Callback: &lt;a href="http://dein-server.de/callback"&gt;http://dein-server.de/callback&lt;/a&gt;&lt;br&gt;
-Logout: &lt;a href="http://dein-server.de/logout"&gt;http://dein-server.de/logout&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The whole should also work with “localhost if you do not have a domain yet.&lt;/p&gt;

&lt;p&gt;For the configuration of the applications we still need:&lt;/p&gt;

&lt;p&gt;-Domain&lt;br&gt;
-ClientID&lt;br&gt;
-ClientSecret&lt;/p&gt;

&lt;p&gt;In your /app/config/laravel-auth0.php you now either set directly the values or use your “.env file.&lt;/p&gt;
&lt;h2&gt;
  
  
  Testing auth0
&lt;/h2&gt;

&lt;p&gt;If you now call &lt;a href="http://dein-server.de/login"&gt;http://dein-server.de/login&lt;/a&gt;, you should seea login and then in your user object the corresponding data as well as an entry in the Users database table.&lt;/p&gt;

&lt;p&gt;What is missing in the documentation: How do I actually protect a route? Simply add the Auth-Middleware to your route.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# monitor (protected)
Route::get('/monitor/id/{id?}/{title?}', 'MonitorController@show')
    -&amp;gt;middleware('auth')
    -&amp;gt;name('monitor.show');

Route::get('/monitor/create', 'MonitorController@create')
    -&amp;gt;middleware('auth')
    -&amp;gt;name('monitor.create');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thats it! — if you prefer a german version of this visit my &lt;a href="https://www.geekpub.de/2017/08/auth0-mit-laravel-5-4-inklusive-speichern-der-user/"&gt;GeekPub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>laravel</category>
      <category>auth0</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Adventure with Docker: Conflicts with UIDs of the container and the host</title>
      <dc:creator>Arne</dc:creator>
      <pubDate>Sun, 16 Jul 2017 05:19:19 +0000</pubDate>
      <link>https://dev.to/ophasnoname/adventure-with-docker-conflicts-with-uids-of-the-container-and-the-host</link>
      <guid>https://dev.to/ophasnoname/adventure-with-docker-conflicts-with-uids-of-the-container-and-the-host</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_DqH5rQg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/x7mlchotxqm2um8tx09c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_DqH5rQg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/x7mlchotxqm2um8tx09c.png" alt="Docker"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are so days when you deal with problems you would never have expected.&lt;br&gt;
&lt;a href="https://zenner-iot.com"&gt;We&lt;/a&gt; had the goal to operate an &lt;a href="https://www.elastic.co/products/elasticsearch"&gt;ElasticSearch Cluster&lt;/a&gt; in our Docker-Swarm. After some time, a finished image was found which makes this halfway possible (problematic is the discovery of other nodes, just as a hint). &lt;/p&gt;

&lt;p&gt;To ensure that all containers in the ElasticSearch Clusters have all the data on the different Docker Swarm Nodes, we use &lt;a href="https://www.gluster.org/"&gt;GlusterFS&lt;/a&gt; as a distributed file system.&lt;/p&gt;

&lt;p&gt;The whole construct was running very well, until we have noticed: Hey NTP is not running on our servers. Ok quickly thrown into the Ansible Playbook and run on the hosts. BAM! The ElasticSearch reports: I do not like you any more dude…&lt;/p&gt;

&lt;p&gt;Now, of course, you wonder what happened here? A look at the hosts showed that now all the files of ElasticSearch belong to the user “systemd-timesync” .. eh? The first guess was, of course, the somewhat worn GlusterFS.&lt;/p&gt;

&lt;p&gt;The actual error is in principle not an error. If you add a host volume to a container, all the files of the container are created with the user running inside the container. Normally many containers run with the user root, which causes no problems, but ElasticSearch after version 5.x does not run as root…&lt;/p&gt;

&lt;p&gt;Now comes the chance in the game, the Image for the ElasticSearch is based on Alpine, here the users begin with the UID 100, unfortunately exactly the UID which has now used by our little friend the “systemd-timesync” user.&lt;/p&gt;

&lt;p&gt;Unfortunately, a really good solution was not available for us, but as a Workaround, the Dockerfile was changed, and we assigned the ElasticSearch user a UID 1200+. Now the files are created with this UID.&lt;/p&gt;

&lt;p&gt;If you find a more clever solution, I’m looking forward to a comment, and if you prefer this text in german, you can find it at the &lt;a href="https://geekpub.de/"&gt;Geek Pub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>glusterfs</category>
      <category>elasticsearch</category>
      <category>swarm</category>
    </item>
    <item>
      <title>How to deploy a Laravel 5.4 (PHP) Application to Microsoft Azure WebApp service</title>
      <dc:creator>Arne</dc:creator>
      <pubDate>Sat, 01 Jul 2017 16:41:56 +0000</pubDate>
      <link>https://dev.to/ophasnoname/how-to-deploy-a-laravel-54-php-application-to-microsoft-azure-webapp-service</link>
      <guid>https://dev.to/ophasnoname/how-to-deploy-a-laravel-54-php-application-to-microsoft-azure-webapp-service</guid>
      <description>&lt;p&gt;You’ve certainly noticed it, there was just a little silence.&lt;br&gt;
This is mainly due to the change of my employer, after 20 years in an energy company, it has left me in a smaller german “Startup (&lt;a href="https://zenner-iot.com" rel="noopener noreferrer"&gt;ZENNER IoT Solutions&lt;/a&gt;), which is costs me some time at the moment (which is completely OK for me!)â€Š–â€Šwhat we do? Building a great IoT Platform!&lt;/p&gt;

&lt;p&gt;There we are happy to participate in the Microsoft BizSpark program,&lt;br&gt;
which means some resources, such as testing Microsoft’s Azure Cloud.&lt;br&gt;
Now my task was to bring a PHP application based on the Laravel 5.4 fFramework to a web app from Microsoft. Microsoft WebApps are their PaaS offer when it comes to hosting .. Surprise: Web applications.&lt;/p&gt;

&lt;p&gt;The base of the WebApps is an iiS server, which makes the whole story a bit more complex than deploying to a 08/15 Apache with PHP .. the iiS is more suitable for Microsoft’s languages like ASP.NET etc. Well, however, nothing is impossible. Here is a short story on how to deploy a Laravel App to Microsoft Azure WebApp Service (Spoiler: It runs very well, if it runs!).&lt;/p&gt;

&lt;p&gt;Let’s assume that your application is finished, and you have already set up &lt;br&gt;
an Azure WebApp (which is trivial). Now we have to do some preparations.&lt;/p&gt;

&lt;h2&gt;
  
  
  PHP Setting for the Azure WebApp
&lt;/h2&gt;

&lt;p&gt;Let â€˜s start with a new PHP version for our WebApp. Fortunately, Microsoft supports PHP 7.1, which we also now select in the Applicationsâ€Š–â€ŠSettings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F14agxl0heta4xiq6i7js.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F14agxl0heta4xiq6i7js.png" title="Azure and Laravel" alt="Azure and Laravel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fv24asmvj1ev7n6ow0452.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fv24asmvj1ev7n6ow0452.png" title="Azure and Laravel" alt="Azure and Laravel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure the Azure WebApp for Laravel
&lt;/h2&gt;

&lt;p&gt;Further on the same page, here a few variables we have to set, so that Azure plays well with Laravel.&lt;/p&gt;

&lt;p&gt;-SCM_REPOSITORY_PATH to: ..\repository&lt;br&gt;
-SCM_TARGET_PATH to: ..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fibc5vqvb3q9eq7b2vb5k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fibc5vqvb3q9eq7b2vb5k.png" title="Azure and Laravel" alt="Azure and Laravel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it is time to change the entry point to our website, the default for Azure is “/site/index.html”, but Laravel want’s : “site/public”. But hey we can also do this on the same page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fjjwxfpqttjm2331tmwzi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fjjwxfpqttjm2331tmwzi.png" title="Azure and Laravel" alt="Azure and Laravel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The matching counterpart to the Apache .htaccess, is the iiS “web.config file, fortunately Laravel ships with a default one, we can use for our application. So no work for us.&lt;/p&gt;

&lt;h2&gt;
  
  
  Composer extension for WebApp
&lt;/h2&gt;

&lt;p&gt;The settings now fit, what makes life even easier for us is an extension that you can simply activate, so you make sure that “composer is executed during the deployment and you do not have to do this manually.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F1n55iugj6f74ruulegph.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F1n55iugj6f74ruulegph.png" title="Azure and Laravel" alt="Azure and Laravel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fuyib7wczed49e4esdryk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fuyib7wczed49e4esdryk.png" title="Azure and Laravel" alt="Azure and Laravel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fyk81s43jf1jfxaxqvamp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fyk81s43jf1jfxaxqvamp.png" title="Azure and Laravel" alt="Azure and Laravel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment “pipeline for our Azure WebApp
&lt;/h2&gt;

&lt;p&gt;The last step: Somehow we must get our application to Azure. Personally, I prefer the deployment via GIT, we clone some kind of a local repository and copy our code into it. After a short “git push we are online, Hooray.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Faxuno343hrt0n09xsy1y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Faxuno343hrt0n09xsy1y.png" title="Azure and Laravel" alt="Azure and Laravel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fi0rixc5cbx474m7j8686.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fi0rixc5cbx474m7j8686.png" title="Azure and Laravel" alt="Azure and Laravel"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>azure</category>
      <category>php</category>
      <category>laravel</category>
    </item>
    <item>
      <title>Setting up a VM with PHP 7.0, MySQL, Apache 2 and PhpMyAdmin on Ubuntu</title>
      <dc:creator>Arne</dc:creator>
      <pubDate>Sun, 16 Apr 2017 08:46:35 +0000</pubDate>
      <link>https://dev.to/ophasnoname/setting-up-a-vm-with-php-70-mysql-apache-2-and-phpmyadmin-on-ubuntu</link>
      <guid>https://dev.to/ophasnoname/setting-up-a-vm-with-php-70-mysql-apache-2-and-phpmyadmin-on-ubuntu</guid>
      <description>&lt;p&gt;It is for me once again time to deal with PHP, yes, some may cry out, but I love the language. Since I wanted to use again a “real VM for it, instead of a Docker container, here is a small tutorial for creating a VM using Virtualbox which can do the following.&lt;/p&gt;

&lt;h2&gt;
  
  
  VM "Features"
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;PHP 7.x&lt;/li&gt;
&lt;li&gt;MySQL 5.x&lt;/li&gt;
&lt;li&gt;Apache 2.x&lt;/li&gt;
&lt;li&gt;Ubuntu 16.04.x&lt;/li&gt;
&lt;li&gt;PHPMyAdmin&lt;/li&gt;
&lt;li&gt;Shared Folder mit dem Mac&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first step is to get our Ubuntu 16.04.x image: &lt;a href="https://www.ubuntu.com/download/server"&gt;Download&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So we create a VM in the Virtualbox GUI, which I always like the best is the use of a network bridge for ssh accessâ€Š–â€Šso the VM gets an internal IP from my network and would be in principle also accessible by NAT from the outside.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zTKuv4_o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ds7mvu95idl802aauaqe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zTKuv4_o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ds7mvu95idl802aauaqe.png" alt="Network Bridge"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think, the installation of the Ubuntu server is nothing I need not describe here, only important: At the end of the installation tick the OpenSSH server so that we can work well with our VM via SSH.&lt;/p&gt;

&lt;p&gt;If you’re still not sure how to do this, or just want to be put into a kind of trance, i have uploaded the whole as a screencast (without comments) on Youtube, 6:30 relaxing (is a bit slow, because in the background Elder Scrolls online is doing his install job).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/5RBxmsuTRX8"&gt;Screencast @ Youtube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get the private IP of the fresh VM, just login and use “ifconfig as command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FyP_3uC9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/cfmowgm2dluc276655xj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FyP_3uC9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/cfmowgm2dluc276655xj.png" alt="ifconfig"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From now on, we are using an SSH connection from our computer to Virtualbox VM.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh ssh user@vm-ip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installation of packages
&lt;/h2&gt;

&lt;p&gt;Continue with the installation of the packages we need for our small server: PHP, Apache and MySQL, PHPMyADMIN (to manage databases from the browser).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update
sudo apt-get install apache2 libapache2-mod-php7.0 php7.0 php7.0-mysql mysql-server
sudo apt-get install phpmyadmin php-mbstring php-gettext
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Please note the “root password, which is set when the MySQL server is installed. So we can connect later to the databasesâ€Š–â€Šthink on a development server we do not need dedicated users.&lt;/p&gt;

&lt;p&gt;Some, or most PHP frameworks require mod rewrite to rewrite the URL, so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo a2enmod rewrite
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the VirtualBOX Guest-extension (which we need to share us with the Mac folder) please set up the following packages before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install build-essential module-assistant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next: Mount the “CD into the VirtualBox, there are the guest extensions on it. To do this, open the window with the virtualbox and click “Devicesâ€Š–â€ŠInsert Guest Additions .. at the top of the menu bar.&lt;/p&gt;

&lt;p&gt;Back in the terminal these are now installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo mount /dev/sr0 /media/cdrom/
cd /media/cdrom
sudo ./VBoxLinuxAdditions.run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Time for a reboot of the box! To share a folder with your Mac (you’ll later put your code there), click Devices again, and open Shared Folders. Search for a suitable folder on your computer and a nice name, check options for Auto-Mount and Make Permanent. In my example I want to use the Temp directory in my personal folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MH2_X4hp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/tuft9vi2vudj3ono7o4a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MH2_X4hp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/tuft9vi2vudj3ono7o4a.png" alt="Shared Folders"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back in the terminal, we now only have to include the folder, I always mount it directly into the document root of the Apache web server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo mount -t vboxsf Temp /var/www/html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We don’t want to repeat this on every reboot, so we put this stuff into “/etc/rc.local”:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
mount -t vboxsf Temp /var/www/html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s create an index.php in our shared folder on our computer with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php phpinfo(); ?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we now open our Browser with the private ip of our VM, we should the the PHP informations:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gSvUgQdg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mplk5q66nyjj8p5zizuo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gSvUgQdg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mplk5q66nyjj8p5zizuo.png" alt="PHP 7 up and running"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To open the PHPMyAdmin just hit the URL: &lt;a href="http://IP/phpymadmin"&gt;http://IP/phpymadmin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s itâ€Š–â€Šsorry for my english, but not my mother tongue. Hope someone finds this short tutorial useful.&lt;/p&gt;

&lt;p&gt;If you want to read more from my stuff, just follow me on Twitter: &lt;a href="https://twitter.com/ophasnoname"&gt;@ophasnoname&lt;/a&gt;&lt;/p&gt;

</description>
      <category>apache</category>
      <category>php7</category>
      <category>ubuntu</category>
      <category>mysql</category>
    </item>
    <item>
      <title>In only 2 1/2 days to Docker expert: books, videos and tutorial recommendations</title>
      <dc:creator>Arne</dc:creator>
      <pubDate>Fri, 17 Mar 2017 15:39:08 +0000</pubDate>
      <link>https://dev.to/ophasnoname/in-only-2-12-days-to-docker-expert-books-videos-and-tutorial-recommendations</link>
      <guid>https://dev.to/ophasnoname/in-only-2-12-days-to-docker-expert-books-videos-and-tutorial-recommendations</guid>
      <description>&lt;p&gt;As you have already noticed, I work in a shop which is using Docker the whole day…&lt;/p&gt;

&lt;p&gt;Especially for new colleagues or not quite “docker insiders”, often comes the desire in me to show them a page or whatever to point them to the most important resources about Docker for rookies.&lt;/p&gt;

&lt;p&gt;Certainly lists with links are out there a lot, but unfortunately those are kind of: We collect everything which has to do something with Docker. &lt;br&gt;
In the end I am however the opinion that one should rather check a few good articles, videos or books, and study them in detail!&lt;/p&gt;

&lt;p&gt;Later if you want to go further, or if you want to look like the Docker Super-Hero, you know where to get more stuff to read!&lt;/p&gt;

&lt;h2&gt;
  
  
  Basicsâ€Š–â€ŠWhat is docker and what is not
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://medium.freecodecamp.com/a-beginner-friendly-introduction-to-containers-vms-and-docker-79a9e3e119b#.rgdp3kabq"&gt;A Beginner-Friendly Introduction to Containers, VMs and Docker&lt;/a&gt;: Unfortunately, not 100% up-to-date, but for me, one of the best articles to enter the Docker universe. The Likes speak for themselves. [30 minutes]&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://bit.ly/2nM8Jq1"&gt;Docker in Production - A History of Failure &amp;amp; Docker in Production: A History of Failure&lt;/a&gt; and the &lt;a href="https://thehftguy.com/2017/02/23/docker-in-production-an-update/"&gt;Update&lt;/a&gt;: I also like critical articles, these two have burned into my brain. I am still convinced by Docker and can not share many points, but you should also be aware of the bad things. Please also take a look at the comments! [30 minutes]&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.docker.com/"&gt;The Documentation&lt;/a&gt;: Have you worked through the 3 articles? There are still a few questions about Docker?! RTFM. Docker's documentation is fairly up-to-date and comprehensive.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Training
&lt;/h2&gt;

&lt;p&gt;If you now have an approximate plan of what it's all about, you might want to get a little deeper into the matter. This is how I feel when a topic really interests me. Here you can also find 1000+ tutorials, books, videos, courses with which you could deal .. but who wants to do it all? So we restrict ourselves to a link for each category!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The Video - &lt;a href="https://www.youtube.com/watch?v=UV3cw4QLJLs"&gt;Docker fundamentals: basics, storage, networkingâ€Š–â€ŠIntroduction to Docker&lt;/a&gt;: Just 50 minutes packed with information, really also something for beginners. [50 minutes]&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Tutorial - &lt;a href="https://blindside.io/courses/a-practical-guide-to-docker"&gt;A Practical Guide for Docker&lt;/a&gt;: Interactive tutorial, very nicely done and extensive (free!). My recommendation number 1! Unfortunately, a registration is necessary before … nothing is completely free in this world [120 minutes]&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Course - &lt;a href="https://www.udemy.com/docker-tutorial-for-devops-run-docker-containers/"&gt;The Complete Docker Course for DevOps and Developers&lt;/a&gt;: Offered by udemy for just 25 â‚¬. 4.5 hours of pure knowledge on the subject! [4.5 hours]&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Book - &lt;a href="http://amzn.to/2myOECs"&gt;The Docker Book&lt;/a&gt;: Why this? It is continuously updatedâ€Š–â€Šwhat is really important. There is, of course, only an e-book, but I guess that should not be a problem. [2 days..?]&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Newsletter
&lt;/h2&gt;

&lt;p&gt;If you now understand what it is, one should also stay up to date. So here is my newsletter recommendation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://blog.docker.com/docker-weekly-archives/"&gt;Docker Weekly&lt;/a&gt;: In fact, the only one I read regularly. Why? Well news directly from the makers and a comprehensive list of links with new tutorials and articles (the Captain Corner)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Ask something …
&lt;/h2&gt;

&lt;p&gt;When reading and trying out, you will surely encounter problems and questions, but where should they be placed?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://stackoverflow.com/questions/tagged/docker"&gt;Stackoverflow&lt;/a&gt;: Go to Stackoverflow and use the Docker tag!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thats all, again sorry for my poor english .. i will try to work on it!&lt;/p&gt;

&lt;h2&gt;
  
  
  ok One more thing!
&lt;/h2&gt;

&lt;p&gt;I would love to set up my own newsletter, around the topics of DevOps. &lt;br&gt;
Maybe you are so fond of supporting me and just register?&lt;br&gt;
You will get some fresh links and news every 2 Weeks (if we get enough nice people).&lt;/p&gt;

&lt;p&gt;Let's call the Newsletter “DevOps Newsletter which has NoName!”&lt;/p&gt;

&lt;p&gt;&lt;a href="http://bit.ly/2mz4AVk"&gt;SIGN UP! FOR THE NEWSLETTER&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
    </item>
    <item>
      <title>Latest DevOps Blogs, Boards and Books to check out today</title>
      <dc:creator>Arne</dc:creator>
      <pubDate>Sat, 11 Mar 2017 06:41:49 +0000</pubDate>
      <link>https://dev.to/ophasnoname/latest-devop-blogs-boards-and-books-to-check-out-today</link>
      <guid>https://dev.to/ophasnoname/latest-devop-blogs-boards-and-books-to-check-out-today</guid>
      <description>&lt;ul&gt;
&lt;li&gt;Update 03-16-2017: Add one new Blog and Twitter Accounts, thanks for your support!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am currently working in the "DevOps" areaâ€Š. Since I originally looked after small cute PHP applications, this was of course, somehow a jump into the cold water.&lt;/p&gt;

&lt;p&gt;Thanks to the Internet, there is enough material for reading , to deal with the subject. If you are interested, whats in my opinion are must be read blogs, pages and books on the subject, feel free and read this little post in peace.&lt;/p&gt;

&lt;p&gt;I've also taken the trouble for you, and listed only the links, where somebody is still alive. In any case, all this links are followed by myself. Except for the Blog of “otto.de”all are in English language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Blogs with fresh stuff
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://techblog.netflix.com/"&gt;The Netflix Tech Blog: The Nerds from Netflix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/blogs/aws/"&gt;AWS Blog: Amazon Web-Services Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloudplatform.googleblog.com/"&gt;Google Cloud Platform: Googles Platform Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codeascraft.com/"&gt;CodeAsCraft: DevOps Blog from Etsy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://nerds.airbnb.com/"&gt;Airbnb Engineering: Maker of the loved AirBnb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devblog.digimondo.io/"&gt;Digimondo DevBlog: Ok.. this is Self-promotion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kickstarter.engineering/"&gt;Kickstarter Engineering: The makers of Kickstarter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.devopsguys.com/blog/"&gt;DevOpsGuys: Private Blog about several DevOps topics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.iheavy.com/blog/"&gt;Scalable Startups: Mostly AWS stuff&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lonesysadmin.net/"&gt;The Lone Sysadmin: Not a “real” DevOps Blog, but high focus at ops.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.heroku.com/"&gt;Blog Heroku: The makers of Heroku Platfom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.andrewhay.ca/blog"&gt;Andrew Hay: Mostly Cyber-Security topics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.otto.de/"&gt;Dev Otto: Blog from “Otto”, famous company in Germany&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devops.com/"&gt;DevOps.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://theagileadmin.com/"&gt;TheAgileAdmi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.xebialabs.com/"&gt;XebiaLabs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://highscalability.com/"&gt;High Scalability: Blog about building robust and fast sites&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dayshaconsulting.com/blog"&gt;Daysha Consulting: Useful case study material and links to learnings&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Boards
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/devops/"&gt;Everything DevOps: Sub-Reddit about DevOps topics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/groups/2825397/profile"&gt;DevOps LinkedIN: 50k+ members&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://discuss.devopsio.com/"&gt;DevOpsIO Discussions: Active DevOps Community/Board&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Podcasts
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.arresteddevops.com/"&gt;Arrested DevOps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://foodfightshow.org/"&gt;Food Fight: Focus on “Chef”&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Newsletters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.devopsweekly.com/"&gt;Weekly DevOps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.hackernewsletter.com/"&gt;Hacker Newsletter: Think you know Hackernews ..&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.serverdensity.com/devops-newsletter/"&gt;The DevOps Newsletter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Slack Channels for DevOps
&lt;/h2&gt;

&lt;p&gt;Want to chat to some other Op Folks?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://devopsengineers.com/"&gt;https://devopsengineers.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devopschat.co/"&gt;https://devopschat.co/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Books to read
&lt;/h2&gt;

&lt;p&gt;Yes if you buy one from those link, i will get some pennies…&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://amzn.to/2lWFt2H"&gt;The Phoenix Project: I love it, story about a company implementing DevOps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://amzn.to/2kAFXeQ"&gt;Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://amzn.to/2kAGnlg"&gt;The Visible Ops Handbook: Implementing ITIL in 4 Practical and Auditable Steps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://amzn.to/2maVcaw"&gt;The DevOps 2.0 Toolkit: Fresh lecture, covering several topics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://amzn.to/2lWFnIy"&gt;Site Reliability Engineering: How Google Runs Production Systems&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Twitter
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/adrianco"&gt;Adrian Cockcroft&lt;/a&gt; Architect @ Netflix &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/martinfowler"&gt;Martin Fowler&lt;/a&gt; ThoughtWorks &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/RealGeneKim"&gt;Gene Kim&lt;/a&gt; Co-Authorâ€Š–â€ŠThe Phoenix Project
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/adamhjk"&gt;Adam Jacob&lt;/a&gt; Co-Founder from Chef &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/andimann"&gt;Andi Mann&lt;/a&gt; Blogger devops.com &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/andrewsmhay"&gt;Andrew Hay&lt;/a&gt; OpenDNS Manager &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/cquinn"&gt;Carl Quinn&lt;/a&gt; Software-Architect Riot Games &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/mortman"&gt;David Mortman&lt;/a&gt; Security-Architect at Dell &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/mipsytipsy"&gt;Charity Majors&lt;/a&gt; Engineer/cofounder at @honeycombio, formerly Parse/Facebook)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You know more good Blogs, Podcasts, Links, Books or whatever .. please feel free to leave a comment or use this form to suggest a Link:&lt;/p&gt;

&lt;p&gt;Suggest new Link: &lt;a href="https://goo.gl/forms/bc3QQ2HeMMCKDJlv1"&gt;Google Form&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By the way, from time to time I will create some more of those, so follow me on twitter: &lt;a href="https://twitter.com/ophasnoname"&gt;@ophasnoname&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://medium.com/@ophasnoname_44358/latest-devop-blogs-boards-and-books-to-check-out-today-8bfd1c343007#.95fx6itpb"&gt;Medium&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>blogs</category>
      <category>twitter</category>
    </item>
  </channel>
</rss>
