jayber / kikuyu-server

This is the part of kikuyu that actually serves requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kikuyu server
=============

Kikuyu is the composition and delivery application for functional components (i.e. components that define all their
layers with the component, might be called vertical components after vertical slice.). These are distinct from components
that only cover a single layer of architecture - horizontal components, may be service components as parts of a
"wedding cake" architecture.

Server installation
###################

Pre-requisites

1. Install Kikuyu application
https://github.com/jayber/kikuyu

2. Install sbt on your machine:
http://www.scala-sbt.org/
You might need to set up proxy by providing -Dhttp_proxy=http://cache2.practicallaw.com:8080 in sbtconfig.txt file.
Alternatively if you are running SBT from console window you may set proxy using command
 'set http_proxy=http://cache2.practicallaw.com:8080'. That allows to run the play or sbt command in the same window.
This setting therefore doesn't persist between command windows.

2. Install Play Framework on you machine:
http://www.playframework.com/

3. Install 'Scala' plugin for IntelliJ IDE

4. Install the 'Play 2.0 Framework support' plugin (this is not just the ordinary Play plugin, you need to search
for it by connecting to the IntelliJ plugin repository)


IntelliJ Dependencies
#####################

If you add or change dependencies in your Build.scala IntelliJ probably won't pick them up.

You should go to a command window in your project directory and run:

play "idea with-sources=yes"

which will update your IntelliJ project.

to get the Play run config to work, add
http.proxyPort	8080
http.proxyHost	cache2.practicallaw.com
to the Environment variables box in the IntelliJ configuration

Running locally
###############
You'll need to add the  -DconfigServerContext=[server_name]:[port]/[context] JVM arg when you start the server, which
points server to kikuyu application WS to collect components configuration.
If you are running server from play console, you can pass it with "run" command. If you are running IntelliJ
Play2 configuration, use the environment properties box to add the argument.
Default port for server is 9000, you can specify different port in Play console using 'http.port' variable, or pass it
to 'run' command from play console. For example: 'run -DconfigServerContext=localhost:9001/kikuyu -Dhttp.port=9037'
If Play is complaining about compilation issues, try running 'sbt clean' command from command line in project directory.

Deploy
######
Use the build.gradle to deploy your kikuyu-server to a dev environment. Make sure that you specify the environment number
use a '-P' command line argument or gradle.properties file.

Running remotely
################
Once you have deployed the server you can stop it and start is using the scripts in the unzipped directory.
Modify server start script to point to the right kikuyu application (check pre-requisites).
Also you might run into issue like 'No such file or..' when trying to run the scripts. To avoid that re-save the *.sh
file, it is likely that script file was copied in DOS format. Re-saving on server will change it to the UNIX one.

About

This is the part of kikuyu that actually serves requests


Languages

Language:Java 88.7%Language:Groovy 9.2%Language:Scala 1.7%Language:Shell 0.4%Language:CSS 0.0%