From c7b7223ece13b50a5e24fcfbe7d43a65a4ec1cfd Mon Sep 17 00:00:00 2001 From: Serge Bazanski Date: Tue, 9 Oct 2018 14:52:07 +0100 Subject: [PATCH] flaskify --- app.py | 16 +++ requirements.txt | 6 ++ index.html => templates/index-en.html | 2 +- templates/index-pl.html | 148 ++++++++++++++++++++++++++ 4 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 app.py create mode 100644 requirements.txt rename index.html => templates/index-en.html (98%) create mode 100644 templates/index-pl.html diff --git a/app.py b/app.py new file mode 100644 index 0000000..e1445cb --- /dev/null +++ b/app.py @@ -0,0 +1,16 @@ +import flask + +app = flask.Flask(__name__) + +@app.route('/') +def view_index(): + lang = flask.request.args.get('lang', '').lower() + pl = flask.request.accept_languages['pl'] + en = flask.request.accept_languages['en'] + if lang == 'pl' or pl > en: + return flask.render_template('index-pl.html') + else: + return flask.render_template('index-en.html') + +if __name__ == '__main__': + app.run(debug=True) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8ca2452 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +Click==7.0 +Flask==1.0.2 +itsdangerous==0.24 +Jinja2==2.10 +MarkupSafe==1.0 +Werkzeug==0.14.1 diff --git a/index.html b/templates/index-en.html similarity index 98% rename from index.html rename to templates/index-en.html index 1add26a..a78f8dc 100644 --- a/index.html +++ b/templates/index-en.html @@ -27,7 +27,7 @@ h3 {

Warsaw Hackerspace Hosting Services

-
PL | EN
+
PL | EN

Nine Fives SLA for the masses.

diff --git a/templates/index-pl.html b/templates/index-pl.html new file mode 100644 index 0000000..b8d460c --- /dev/null +++ b/templates/index-pl.html @@ -0,0 +1,148 @@ + + + + + Hosting w Warszawskim Hackerspace'ie + + + +
+

Hosting w Warszawskim Hackerspace'ie

+
PL | EN
+

+ Nine Fives SLA for the masses. +

+ +

What is this?

+

+ The Warsaw Hackerspace is a Non-Profit, Non-Governmental Organization from Warsaw that runs a bunch of infrastructure for its own needs. In order to make back some of our expenses (network connection, cooling, ...), we decided to start renting out some of our services to outside customers. All of the proceeds will go towards the statuatory goals of the Organization: maintaining and expanding our hackerspace, teaching and education, running classes and generally making the world a better place. +

+

+ Give us money, receive rack space or dedicated servers. And most importantly, a warm fuzzy feeling from supporting a hackerspace <3. +

+

+ Remember, we're a Hackerspace. While we try to maintain as high as un uptime as possible, power and Internet interruptions are always an option, as we do not (yet) have any redundancy in place. So yeah, no warranty. Seriously. If we're down for more than 5% of a given month, your bill will be proportionately lowered to match our downtime - we're not monsters, after all. +

+

Ordering

+

+ Contact us at noc@hackerspace.pl and tell us who you are and what you need. We'll respond with a final quote and our world famous NO WARRANTY, NO SLA, NO NOTHING agreement. What follows are list prices in EUR, net (add 23% VAT unless you're a registered EU company with a VAT number). +

+

Colocation

+

+ We can throw your hardware into one of our 42U racks. We'll provide you power and a way to monitor and manage it. Bring your own KVM/iKVM, or rely on lazy remote hands. We measure power usage via a kill-a-watt, and you're billed monthly based on the power you use. +

+

+ What you get: +

    +
  • 19" rack space (we do not accept non-rack hardware unless it's something really cool)
  • +
  • 230V AC 50Hz via a C14 plug on a 16A circuit
  • +
  • 1GbE (copper) or 10GbE (SFP+) switch port (does not include Internet access)
  • +
+ Pricing: €25 per month per rack unit. €0.25 per KWh. Internet pricing below. +

+

Dedicated Servers

+

+ We have some servers that we can rent you out. We'll provide you with a way to manage the power on it, remotely reinstall the operating system. Some of the machines also come with integrated KVM. +

+

+

BL-BASE

+ A Dell M610 blade server. +
    +
  • Xeon L5520 @2.27GHz, 8c/16t
  • +
  • 24GB RAM ECC
  • +
  • 2x 140GB SAS (used - use RAID1!)
  • +
  • KVM (power control, console, keyboard, mouse, ISO mount)
  • +
  • Hardware RAID controller with BBU(PERC)
  • +
  • 2x Gigabit Ethernet
  • +
+ Pricing: €75 per month + Internet. +

+

+

BL-64-SSD

+ A souped-up Dell M610 blade server. +
    +
  • Xeon L5520 @2.27GHz, 8c/16t
  • +
  • 64GB RAM ECC
  • +
  • 2x 480GB consumer MLC SSD
  • +
  • KVM (power control, console, keyboard, mouse, ISO mount)
  • +
  • Hardware RAID controller with BBU (PERC)
  • +
  • 2x Gigabit Ethernet
  • +
+ Pricing: €100 per month + Internet. +

+

+

BL-64-HDD

+ A souped-up Dell M610 blade server. +
    +
  • Xeon L5520 @2.27GHz, 8c/16t
  • +
  • 64GB RAM ECC
  • +
  • 2x 2TB consumer 2.5" HDD
  • +
  • KVM (power control, console, keyboard, mouse, ISO mount)
  • +
  • Hardware RAID controller with BBU (PERC)
  • +
  • 2x Gigabit Ethernet
  • +
+ Pricing: €100 per month + Internet. +

+

+

KEKTOP

+

+ Way back when, the Hackerspace acquired a whole bunch a Nettop-class machines that used to display advertising in Warsaw taxicabs. After christening them as 'kektops' (hey, that was before the world went to shit), we have decided to rack them up in a custom enclosure with power management, and turned them into a perfect VPS-class dedicated server. +

+

+ Even though the seem underpowered at first glance, they are fairly capable - much more so than a Raspberry Pi, for instance. They make perfect little servers for hosting a blog or small service. Just make sure to get two for redundancy :). +

+
    +
  • Intel Atom @1.60GHz, 1c/2t
  • +
  • 2GB RAM
  • +
  • 16GB SSD
  • +
  • Gigabit Ethernet
  • +
+ Pricing: €10 per month + Internet. +

+

Internet Access

+

+ In addition to the above services, you will have to pay for an internet connection. We provide upstream via bgp.wtf/AS204480, which has decent connectivity with Poland and to the world (upstreams are Level 3, Telia, GTT, RETN, DE-CIX). We also have direct peering with Google (AS204880). +

+

+ Currently our main upstream circuit is 1GbE, with plans to upgrade to 10GbE as soon as enough commitment is purchased by customers. +

+

+ As we're a registered ISP, we are governed by laws requiring us to provide LEAs with identifying information about customers if a warrant is served for illegal activity. Thus, we will need to collect such some personal information from you (name, address, phone number). The Hackerspace is under the jurisdiction of Polish law. +

+

+ We have a zero tolerance policy towards spam. Customers not responsive to abuse@ requests will have their contract immediately terminated. +

+ What you get: +

    +
  • A public IPv4 address and a /64 or /48 of IPv6 addresses
  • +
  • Reverse DNS
  • +
  • Speed burstable to wire speed of the switch/machine
  • +
+ Pricing: €7 for a port, then €7 for every 10Mbps of Internet bandwidth committment (can be shared across all of your services). If you want a best effort port, you can buy 0Mbps commitment. +

+

Extra Features

+

+ Contact us for any extra features, like BGP routing, VLANs, extra addresses, ASN sponsorship, ... +

+
+ +