Skip to main content

the avatar of Chun-Hung sakana Huang

openSUSE.Asia Summit 2016

openSUSE.Asia Summit 2016


“Smiles - The reason we get together”




“All the honor belong to our strong local committee and staff”


This year, openSUSE.Asia summit host in Yogyakarta, Indonesia.


Let’s see some videos first :)


Pre-event Workshop





DAY 1






Day 2






It’s great and mad to have almost 500 geeko in openSUSE.Asia Summit.


Pre-event workshop group photo


Day 1 Group photo


Day 2 Group photo


You could find more photos in flick group photo here. ( https://www.flickr.com/groups/opensuse-asia-summit-2016/pool  )


It’s my pleasure to co-work with Indonesia team, all I have to do is…..
See the PASSION and MAGIC - they make”  :)




Also my pleasure to give openSUSE.Asia Book to Estu.
( From Taiwan team to Indonesia team )
( The best way is AL give to Estu, but AL is not here this year )  QQ





All team( Beijing / Taiwan / Japan / Germany ) got medal this year :) Thanks local team.



I have one workshop this year.


Ansible and openSUSE workshop





I want to thank all our sponsors
Without our sponsors, we can't have such lovely summit.


Thanks everyone come to openSUSE.Asia Summit.
Thanks all friends come to together, smiles - make us get together.


I wish I could keep contribute to openSUSE.
-Fun and share-


the avatar of Vojtěch Zeisek

Kurz práce v příkazové řádce Linuxu nejen pro MetaCentrum 2017

Course of work in Linux command line not only for MetaCentrum 2017

Don’t be afraid of command line! It is friendly and powerful tool. Practically identical is command line also in Mac OS X, BSD and another UNIX-based systems, not only in Linux. Basic knowledge of Linux is not conditional. Course will be taught in Linux, but most of the point are applicable also for another UNIX systems like Mac OS X. Knowledge of Linux/UNIX is useful e.g. for working with molecular and another data. MetaCentrum is service provided by CESNET allowing access to huge computational capacity.

vojta

a silhouette of a person's head and shoulders, used as a default avatar

Deploy your Flask Web Application on Ubuntu 16.04 with Apache, Gunicorn and systemd

I still get questions from time to time about how to deploy a python web application using Apache and not NGINX. Here is a quick tutorial to deploy your Flask application on Ubuntu 16.04 or any linux distribution (considering relevant changes) using Apache, Gunicorn and systemd. Until some weeks ago I used supervisord instead of systemd but nowadays I prefer to use systemd because is already there, installed, part of system. And also the reason to look into systemd and to switch was that I had to deploy an application on SLES (SUSE Linux Enterprise Server) and there is no supervisord package available in repos.

Note: This is a very basic configuration to get everything running. It is just for learning and to get the idea how everything is connected.

So, let's start:

  • we create a user which will run our Flask application
# adduser flaskappuser
  • install and configure apache:
# apt-get install apache2

As result we should get the default apache webpage in browser (http://your-ip-here)

  • we have to enable proxy modules for apache:
# a2enmod

and give this list of modules to enable:

proxy proxy_ajp proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html
  • Add our application to apache web server config file. Add the following lines (inside VirtualHost block) to /etc/apache2/sites-available/000-default.conf. Make a backup of this file before you modify it
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPreserveHost On
    <Location "/flaskapp">
          ProxyPass "http://127.0.0.1:5000/"
          ProxyPassReverse "http://127.0.0.1:5000/"
    </Location>

so, the final file should look like this:

<VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
    <Proxy *>
        Order deny,allow
          Allow from all
    </Proxy>
    ProxyPreserveHost On
    <Location "/flaskapp">
          ProxyPass "http://127.0.0.1:5000/"
          ProxyPassReverse "http://127.0.0.1:5000/"
    </Location>
</VirtualHost>
  • restart apache to see if is working:
# service apache2 restart

http://your-ip-here —> should give you the same standard html page for apache, as before

http://your-ip-here/flaskapp —> should give you:

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

that’s because we still don’t have our Flask app running, but it seems that apache is trying to send the request to it, good.

  • let’s take care of our Flask app:

we will run it in a virtual environment, so let’s install virtualenv:

# apt-get install python3-venv

create and activate our new venv:

# cd /home/flaskappuser
# mkdir flaskapp
# cd flaskapp
# python3.5 -m venv flaskvenv
# source flaskvenv/bin/activate

install flask and gunicorn in our venv:

# pip install flask gunicorn

create out simple flask app (/home/flaskappuser/flaskapp/app.py)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#!/usr/bin/env python

from flask import Flask

app = Flask(__name__)

@app.route("/")
def index():
    return "Hello from FLASK"

if __name__ == "__main__":
    app.run(host='127.0.0.1')

let’s run our app to see if is working:

(flaskvenv) root@apache-flask:~/flaskapp/# python app.py
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [10/Oct/2016 13:58:56] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [10/Oct/2016 13:58:59] "GET / HTTP/1.1" 200 -

in your web browser you should see: Hello from FLASK if you try: http://your-ip-here/flaskapp

  • everything is ok right now, but we want to use Gunicorn as our application server, so let’s configure it

in the same place where your Flask application is (/home/flaskappuser/flaskapp/ in my case) create a gunicorn.conf file with the following content:

accesslog = "/home/flaskappuser/flaskapp/logs/gunicorn_access.log"
errorlog = "/home/flaskappuser/flaskapp/logs/gunicorn_error.log"

we have to create our directory where to store the logs files:

# mkdir logs

now we can try to test our app again by running it using gunicorn:

# gunicorn -c gunicorn.conf -b 0.0.0.0:5000 app:app

check the browser and see if you app is working. Should work 😃

make sure that everything in flaskappuser home directory belongs to this user

# chown -R flaskappuser:flaskappuser /home/flaskappuser/

Now we have one more step. We want to monitor our Flask app and to restart it on crashing or to have nice start/stop commands for it. Or to have it started automatically on reboot. In order to do that we can use systemd which is available already in Ubuntu 16.04.

For that we have to create a .service file for our app. Here is my file: (/etc/systemd/system/flaskapp.service):

[Unit]
Description=flaskapp
After=network.target

[Service]
User=flaskappuser
Restart=on-failure
WorkingDirectory=/home/flaskappuser/flaskapp/
ExecStart=/home/flaskappuser/flaskapp/flaskvenv/bin/gunicorn -c /home/flaskappuser/flaskapp/gunicorn.conf -b 0.0.0.0:5000 app:app

[Install]
WantedBy=multi-user.target

activate our .service file

# systemctl daemon-reload

enable it at boot/restart

# systemctl enable flaskapp

start our app

# systemctl start flaskapp

Check if our app is running:

(flaskvenv) root@apache-flask:~/flaskapp# tail -f /var/log/syslog
Oct 10 14:25:59 guest systemd[1]: Started ACPI event daemon.
Oct 10 14:26:03 guest systemd[1]: Started flaskapp.
(flaskvenv) root@apache-flask:~/flaskapp# ps aux | grep gunicorn
flaskappuser      7263  0.2  2.9  64904 22492 ?        Ss   14:26   0:00 /home/flaskappuser/flaskapp/flaskvenv/bin/python3.5 /home/flaskappuser/flaskapp/flaskvenv/bin/gunicorn -c /home/flaskappuser/flaskapp/gunicorn.conf -b 0.0.0.0:5000 app:app

check the app in your browser:

http://your-ip-here/flaskapp

you can stop your app with:

# systemctl stop flaskapp

Done!

Note: Here is my repository with the files: GitHub

a silhouette of a person's head and shoulders, used as a default avatar

ERR_NETWORK_CHANGED in Chrome/Chomium @openSUSE_Tumbeweed @DELL_5510

I've started seeing this error - ERR_NETWORK_CHANGED - regularly in Chrome recently. This had some nasty side effects such as Trello reporting that the board I was using does not exist, etc. without any simple possibility to recover from that issue. At first I thought that it was caused by Chrome itself, especially as everything seemed to work well in Firefox, but as Firefox did not fit my needs, I tried switching to Chromium and started seeing the same error after a while again. That made me search for some simple solution.

Almost all I found was related to some other operating system, but at least I found a great debugging feature in Chrome. You will find it at this location: chrome://net-internals/#events (obviously in Chrome/Chromium only). And there were many errors NETWORK_IP_ADDRESSES_CHANGED - appearing basically every second.

Anyway, long story short. After trying a few other things, I've decided to switch from using NetworkManager to Wicked. Well, yes, even if that basically turns my laptop into a desktop machine. 
  • Good news #1 I've stopped seeing these errors instantly
  • Good news #2 I haven't started seeing any other errors either
You can simply switch the networking option in YaST. Just run yast2 lan as root. In Global Options, switch General Network Settings from NetworkManager to Wicked and save the settings with OK.

Currently installed packages
  • google-chrome-stable-53.0.2785
  • NetworkManager-1.4.0

a silhouette of a person's head and shoulders, used as a default avatar

FlightGame

FlightGame
FlightGear is a very nice simulator, but it is not a lot of fun: page with "places to fly" helps. But when you setup your flight details, including weather and failures, you can kind of expect what is going to happen. FlightGame was designed to address this (not for me, unfortunately, alrough... if you ever debugged piece of software you know unexpected things happen): levels are prepared to be interesting, yet they try to provide enough information so that you don't need to
study maps and aircraft specifications before the flight.
Don't expect anything great/too complex, this is just python getting data from gpsd, and causing your aircaft probles over internal webserver. But it still should be fun.
Code is at
. I guess I should really create a better README.
Who wants to play?

the avatar of Klaas Freitag

Recent ownCloud Releases

Even though we just had the nice and successful ownCloud Contributor Conference there have quite some ownCloud releases happened recently. I like to draw your attention to this for a moment, because some people seem to fail to see how active the ownCloud community actually is at the moment.

There has been the big enterprise release 9.1 on September 20th, but that of course came along with community releases which are in the focus here.

We had server release 8.0.15, server release 8.1.10, server release 8.2.8 and release 9.0.5. There are maintenance releases for the older major versions, needed to fix bugs on installations that still run on these older versions. We deliver them following this plan.

The latest and greatest server release is release 9.1.1 that has all the hardening that also went into the enterprise releases.

Aside a ton of bugfixes that you find listed in the changelog there have also been interesting changes which drive innovation. To pick just one example: The data fingerprint property. It enables the clients to detect if the server got a backup restored, and saves changes on the clients to conflict files if needed. This is a nice example of solutions which are based on feedback from enterprise customers community running ownCloud, who help with reporting problems and proposing solutions.

Talking about professional usage of ownCloud: Of course also all the server release are available as linux packages for various distributions, for example the ownCloud server 9.1.1 packages. We think that our users should not be forced to deploy from tarballs, which is error prone and not native to Linux, but have the choice to use linux packages through the distributions package management.

There also have been client releases recently: The Android client versions 2.1.1 and 2.1.2 were released with important changes for Android 7 and much more fixes, as well as iOS client versions 3.5.0 and 3.5.1. The desktop client 2.2.4 also got a regular bug fix update (Changelog).

I guess you agree that is a lot of activity shown in the ownCloud project, making sure to get the best ownCloud experience out there for the users, driven by passion for the project and professional usage in focus.

If you are interested and want to join in and make ownCloud better, jump in on ownCloud Central or Github. It’s fun!

a silhouette of a person's head and shoulders, used as a default avatar

Linux V4.8 on N900

Basics work, good. GSM does not work too well, which is kind of a problem. Camera broke between 4.7 and 4.8. That is not good, either.

If you want to talk about Linux and phones, I'll probably be on LinuxDays in Prague this weekend, and will have a talk about it at Ubucon Europe.

the avatar of Efstathios Iosifidis

Install Nextcloud on openSUSE Leap (apache+mariadb)


I see the official documentation has full tutorial for RHEL 6 or CentOS 6 and RHEL 7 or CentOS 7. The main documentation covers Ubuntu 14.04 LTS

openSUSE already has the Nextcloud client packaged in Tumbelweed and the Server is in the PHP extra repo! Personally, I prefer to install eveything from official repository, so when an update is available, I can have it without a glitch. This tutorial describes how to install Nextcloud using command line. I followed the official documentation of Ubuntu 14.04 LTS installation.

Why choose openSUSE Leap? openSUSE Leap is a brand new way of building openSUSE and is new type of hybrid Linux distribution. Leap uses source from SUSE Linux Enterprise (SLE), which gives Leap a level of stability unmatched by other Linux distributions, and combines that with community developments to give users, developers and sysadmins the best stable Linux experience available. Contributor and enterprise efforts for Leap bridge a gap between matured packages and newer packages found in openSUSE’s other distribution Tumbleweed. You can download openSUSE Leap from the site https://software.opensuse.org/.

Make sure that ssh (sshd) is enabled and also the firewall either is disabled or make an exception to the apache and ssh services. You can also set a static IP (check out how).

First of all, let's install the required and recommended modules for a typical Nextcloud installation, using Apache and MariaDB, by issuing the following commands in a terminal:

zypper in apache2 mariadb apache2-mod_php5 php5-gd php5-json php5-fpm php5-mysql php5-curl php5-intl php5-mcrypt php5-zip php5-mbstring php5-zlib

Create Database (optional since it'll create eveything automatically)

Next step, create a database. First of all start the service.

systemctl start mysql.service
systemctl enable mysql.service

The root password is empty by default. That means that you can press enter and you can use your root user. That's not safe at all. So you can set a password using the command:

mysqladmin -u root password newpass

Where newpass is the password you want.

Now you set the root password, create the database.

mysql -u root -p
#you'll be asked for your root password

CREATE DATABASE nextcloudb;

GRANT ALL ON nextcloudb.* TO ncuser@localhost IDENTIFIED BY 'dbpass';

Database user: ncuser
Database name: nextcloudb
Database user password: dbpass

You can change the above information accordingly.

PHP changes

Now you should edit the php.ini file.

nano /etc/php5/apache2/php.ini

change the values

post_max_size = 50G
upload_max_filesize = 25G
max_file_uploads = 200
max_input_time = 3600
max_execution_time = 3600
session.gc_maxlifetime = 3600
memory_limit = 512M

and finally enable the extensions.

extension=php_gd2.dll
extension=php_mbstring.dll

Apache Configuration

You should enable some modules. Some might be already enabled.

a2enmod php5
a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime

Now start the apache service.

systemctl start apache2.service
systemctl enable apache2.service


Install Nextcloud

Before the installation, create the data folder and give the right permissions (preferably outside the server directory for security reasons). I created a directory in the /mnt directory. You can mount a USB disk, add it to fstab and save your data there. The commands are:

mkdir /mnt/nextcloud_data
chmod -R 0770 /mnt/nextcloud_data
chown wwwrun /mnt/nextcloud_data

Now download Nextcloud (find the latest version at https://nextcloud.com/install/). Then unzip and move the folder to the server directory.

wget https://download.nextcloud.com/server/releases/nextcloud-12.0.0.zip
unzip nextcloud-12.0.0.zip
cp -r nextcloud /srv/www/
chown -R wwwrun /srv/www/htdocs/nextcloud/

Make sure that everything is OK and then delete the folder nextcloud and nextcloud-12.0.0.zip from the root (user) directory.

Now open your browser to the server IP/nextcloud


Set your administrator username and password.
Your data directory is: /mnt/nextcloud_data
Regarding database, use the following.
Database user: ncuser
Database name: nextcloudb
Database user password: dbpass

Wait until it ends the installation. The page you'll see is the following.


For more configuration, you can follow the official documentation. That was the basic installation on openSUSE Leap.

For any changes, check the github page.

the avatar of Jos Poortvliet

Get started with Nextcloud App development in 6 easy steps!

The brand new app scaffolding tool in our app store
Last night, Bernhard Posselt finished the app scaffold tool in the app store, making it easy to get up and running with app development. I was asked on twitter to blog about setting up a development environment, so... here goes.

What's simpler than downloading a zip file, extracting it and running a command in the resulting folder to get an Nextcloud server up on localhost for hacking?

Yes, it can be that simple, though it might require a few minor tweaks and you have to make sure to have all Nextcloud dependencies installed.

Note that this is useful if you want to develop an Nextcloud app. If you want to develop on the Nextcloud core, a git checkout is the way to go and you'll need some extra steps to get the dependencies in place, get started here. Feedback on this process is highly appreciated, especially if it comes with a pull request for our documentation of course ;-)

Step 1 and Two: Dependencies

  • Install PHP and the modules mentioned here
    Your distro should make the installation easy. Try these:
    • openSUSE: zypper in php5 php5-ctype php5-curl php5-dom php5-fileinfo php5-gd php5-iconv php5-json php5-ldap php5-mbstring php5-openssl php5-pdo php5-pear php5-posix php5-sqlite php5-tokenizer php5-xmlreader php5-xmlwriter php5-zip php5-zlib
    • Debian: apt-get install php5 php5-json php5-gd php5-sqlite curl libcurl3 libcurl3-dev php5-curl php5-common php-xml-parser php5-ldap bzip2
  • Make Nextcloud session management work under your own user account.
    Either change the path of php session files or chmod 777 the folder they are in, usually something like /var/lib/php (debian/SUSE) or /var/lib/php/session (Red Hat).

The Final Four Steps


Nextcloud should present you with its installation steps! Give your username and password and you're up and running with SQLite.

Start with the app

Now you create a subfolder in the nextcloud/apps with the name of your app and put in a skeleton. You can generate an app skeleton really easy: use the scaffolding tool, part of our new app store for Nextcloud 11!

It's probably wise to now get going with the app development tutorial here. This isn't updated for the scaffolding tool yet, so you'll have a head start here. Be sure to check out the changelog, we try to make sure the latest changes are noted there so even if we didn't manage to fully update the tutorial, you can find out what will and won't work in the changelog. Also, be sure to update the links to get the latest dev doc - this all links to 11, once that is out it is probably better to directly target 12 and so on.

Help and feedback

Your input is very much welcome! If you run through these steps and get stuck somewhere, let me know and I'll update the documentation. Or, of course better still, do a pull request on the documentation right in github. You don't even have to do a full checkout, smaller fixes can easily be done in the web interface on github.

Last but not least, ask questions on our forums in the app dev channel or on IRC. Here is the Nextloud development IRC chat channel on freenode.net, also accessible via webchat.

Thanks, good luck, and have fun building Nextcloud apps!
a silhouette of a person's head and shoulders, used as a default avatar

My Experience With Medium

It’s been about 3 months now since I switched over to Medium from Wordpress. Now that I have had a chance to experience it a bit I think I can provide a comparison between Medium and Wordpress.

Pros

  • Simple, easy to use interface, almost never have to drill down menus looking for options
  • Super easy to use editor, its basically blank and you only see what you write until you want to insert something, save or publish your post
  • “Reads” statistics, this lets you see how many people that visit a specific post actually bother to scroll down or read it. It’s a useful way to determine if you are doing a good job of capturing the readers interest
Views column shows direct views in black and indirect (ex. RSS) views in gray
  • Medium doesn’t do the stupid “” replacement with html character codes that Wordpress performs in code tags. This was one of the reasons I decided to leave Wordpress, the ability to disable the “feature” required paying
  • Publications allow you to easily setup a system where members can submit posts that are displayed on a shared page
  • Draft comments can be left by members of your publication and those you share the draft link with, allowing you to get feedback on stories before making them public
  • Comments can leave tags on your article, allowing readers to easily reference sections that they are addressing
Notes that readers can leave behind for the author/publication
Notes are also visible in the comments, you can click on them to jump to the referenced portion of the post
  • Great embedding support, I found it very easy to embed and format things into posts. Pictures, Twitter, Videos, its all pretty nice and easy
  • Lack of plugins, strangely a good thing. One of the biggest detractors of Wordpress is the terrible nature of plugin developers (and users) to never address security issues. It’s extremely common for Wordpress sites to get breached due to insecure/not updated plugins

Cons

  • Lack of syntax highlighting is super annoying on Medium. I have not looked for alternatives to the default code boxes but they are not that useful. Wordpress provided some great features in its code tags.
  • Cannot really mess around with the blog theme, while the default looks fine it leaves something to be desired. I actually really liked the theme from my Wordpress blog as it was simple to navigate and just showed you the content you wanted to see.
  • Medium definitely does not give you as much control of the blog as Wordpress did, however this wasn't as big as a con as it may seem. Most of the time I never used any of the fancy admin features Wordpress provided (mainly because you need to pay to use them)
  • Does not seem to have as much help available online as Wordpress does, makes it tricky at times when I want to do something fancy and cannot determine if Medium actually supports the feature
  • Medium does not allow you to leave notes for readers which can be frustrating when you don’t want to sidetrack the main content of the blog post

Overall I think I am happy with using Medium over Wordpress. It feels more slick to me and the editor is really easy to use. While some of the issues above do leave me wanting for the functionality I had in Wordpress, I think that Medium provides an overall better experience for writing.


My Experience With Medium was originally published in Information & Technology on Medium, where people are continuing the conversation by highlighting and responding to this story.