Codecoon is the next generation hosting portal from the punkt.de GmbH. In this talk we explain how we implemented the portal and its components using TYPO3 Flow, Opscode Chef, Vagrant and Sinatra. We give a detailed insight in why we used which technologies and which developer itches we want to tackle.
10. The Codecoon Vision
Provide CI as a service
→ focus on your project again
→ avoid all the orange activities
→ avoid as much light-blue activities as possible
16. Webspace Version 4
Webspace Version 4
Webspace Version 1
Abstract Webspace
Webspace Version 3
Webspace Version 2
17. /* *
* @Annotation
* @Target("CLASS")
*/
final class Artifact {}
Wir wollen zeigen,
* dass es mit wenig Code
möglich ist, die
Persistierung in Flow zu
beeinflussen
* wie wir dies genutzt haben
und ein Domain-Objekt in
unterschiedlichen
Implementierungsversionen
in der Datenbank zu
persistieren
18. /**
* @FlowEntity
* @PPHArtifact
* @ORMTable(name="pphv2_a_webspace")
*/
abstract class Webspace extends AbstractArtifact {
//...
}
Wir wollen zeigen,
* wie die Annotation für ein
„abstraktes Produkt“
aussieht
* dass wir hier für jedes
Produkt eine Tabelle
angeben können, in der das
jeweilige Objekt persistiert
wird
20. Motivation for a mobile
Development Environment
• Work wherever you are
• Development = Production
• Don’t touch your system
• Distribute environments & cooperate with others
http://www.die-mobile-gesellschaft.de/presse/fotos/themen/03_Mobil_arbeiten/10_Mobil_arbeiten_2.jpg
26. gem 'sinatra'
gem 'sinatra-contrib'
gem 'sinatra-cross-origin'
gem 'sintra-base', '~>1.4.0'
gem 'webrick', '~>1.3.1'
Das ist das Äquivalent zur
composer.json in Ruby.
Statt json/yaml wird bei Ruby
oft auch für solche Dateien
Ruby Code benutzt.
Vorteil: Es sind sehr einfach
eigene Methoden möglich,
die sehr mächtige
Manipulation erlauben.
27. get '/status' do
{
:response => 'status',
:box_initialized => is_initialized(),
:project_type => settings.project_type,
:environment => settings.environment
}.to_json()
end
28. webrick_options = {
:Port => 4567,
:AccessLog => [],
:Logger => WEBrick::Log::new($stderr, WEBrick::Log::DEBUG),
:DocumentRoot => DOCUMENT_ROOT,
:SSLEnable => true,
:SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
:SSLCertificate => OpenSSL::X509::Certificate.new( File.open(File.join(CERT_PATH, "vbox33.box.codecoon.com.crt")).read),
:SSLPrivateKey => OpenSSL::PKey::RSA.new( File.open(File.join(CERT_PATH, "vbox33.box.codecoon.com.key")).read),
:SSLCertName => [ [ "CN",WEBrick::Utils::getservername ] ],
:app => BoxManagementApi
}
Rack::Server.start webrick_options
Gesamte Webserver -
Konfiguration mit Sinatra.
Das ist alles, was man
braucht, um
* einen eigenen Webservice
* mit eigenem Webserver
* mit SSL Verschlüsselung
* mit eigenem Logging
* auf einem eigenen HTTP
Port
laufen zu lassen.
35. 5. ERP
• Our ERP has crappy „Web Service“
• No user management / queue in the Web Service
• Used MessageQueue (RabbitMQ)
• Made ERP Multi-User ready
Was wollen wir mit dieser Folie zeigen?
* Anbindung des ERP Systems an die
Hosting-Oberfläche
* Verwaltung von Kunden, Rechnungs-
und Vertragsdaten
* Anbindung über einen „Webservice“
* ** eine Art SOAP
Codecoon Management Portal
ERP
36.
37. Outlook
• Implement the missing parts of our vision
• Jenkins and Gitlab as integrated services
• Production Stage
• User driven development
• 10 Early Adopters
38. Flow - the good things
* Fluid is a great Template Engine
* Functional testing with Flow is pure fun
* Business (Domain) Logic can be implemented with very little
Framework overhead
* Command Controllers are great
FLOW
39. Flow - the not so nice things
* Flow Packages are not modular
* „Everything or nothing“
* Code-Rewrite makes feedback cycles during development slow
* Remote Debugging in proxy classes can be annoying
* All the „magic things in the background“ and declarative stuff
makes understanding hard
* Code-Completion and IDE tools not very helpful
* Webservices (REST) are not easy to implement
* There is no ready-to-use Controller à la Sinatra
* Not much „Best-Practices“ on Google…
FLOW
40. Resume
• Flow is a powerful Framework
• Integrates well with 3rd party components
• Don’t use it „unreflected“
• Best detail solution vs. smoothes integration
• Duplicated configuration
• Duplicated functionality