This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Unframed ::= UnframedData (NL UnframedData)* | |
| UnframedData ::= FieldChar* (Tab Fields)? | |
| Framed ::= Frame (NL Frame)* | |
| Frame ::= Framing (NL Framing)* FramedData (NL FramedData)* | |
| Framing ::= ColumnInfo | PragmaLine | Version | '#' (Char - NL)* | |
| FramedData ::= ('' | (FieldChar - '#') FieldChar*) (Tab Fields)? | |
| ColumnInfo ::= ('#:' | '#.') Space* | |
| ('' | (FieldChar - Space) FieldChar*) (Tab Fields)? | |
| PragmaLine ::= ('#=' | '#-') (Char - NL)* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This Python/Scala like syntax with type annotations | |
| # would be easier for people to write. | |
| def join_convention(a: Table, b: Table): | |
| col: Column = b.columns[a.table_name] | |
| [ * for * in join(a, b) on a(id) = b(col) ] | |
| # This is more a sketch than anything. The handling of functions, | |
| # table column lookups, actual properties of tables and columns, | |
| # and "computed" tables and columns are all important in the syntax. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Call in the scope of a request handler to retrieve basic auth parameters | |
| // if they are present. | |
| def basicAuth()(implicit request: Request[_]): Option[(String, String)] = { | |
| val Basic = "^ *Basic +([^ ].+)$".r | |
| for { | |
| auth <- request.headers.get("Authorization") | |
| Basic(base64) <- Basic.findFirstIn(auth) | |
| decoded <- Option(new BASE64Decoder().decodeBuffer(base64)) | |
| plain <- Option(new String(decoded, "UTF-8")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| def argv(*args, **opts): | |
| """ | |
| Produces an argument vector from its array of arguments and keyword | |
| options. First, the options are unpacked. When the value is a ``bool``, | |
| the option is passed without an argument if it is true and skipped if it | |
| is ``false``. When the option is one of the flat built-in types -- a | |
| ``string`` or ``unicode`` or ``bytes`` or an ``int`` or a ``long`` or a | |
| ``float`` -- it is passed literally. If the value is a subclass of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To get started with Docker/Marathon/Mesos, you need to install a | |
| new Mesos, a new Marathon, and Deimos, the bridge to Docker. | |
| You'll also need Docker and the JVM. These instructions are for | |
| Ubuntu 13.10. | |
| ## Install Mesos prerequisites | |
| :; sudo apt-get update | |
| :; sudo apt-get install zookeeperd default-jre python-setuptools python-protobuf curl pip | |
| ## Install recent Mesos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pushd /tmp && | |
| git clone https://github.com/mesosphere/mesos-deb-packaging && | |
| pushd mesos-deb-packaging && | |
| ./build_mesos --repo https://github.com/mesosphere/mesos?0.19.0-xcon3 --nominal-version 0.19.0-xcon3 | |
| # Deb will be pkg.deb | |
| # Egg will be mesos.egg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Launching CentOS AMIs: | |
| :; source ./aws.profile | |
| :; aws ec2 run-instances --image-id ami-eb6b0182 \ | |
| --instance-type m1.small --count 6 \ | |
| --key-name "$AWS_SSH_KEY" \ | |
| --security-groups "$AWS_SECURITY_GROUP" | |
| ### Viewing run status and DNS names for relevant instances: | |
| :; source ./aws.profile | |
| :; aws ec2 describe-instances --output text \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mesosphere.servicenet.dsl | |
| import scala.Ordered | |
| import Ordering.Implicits._ | |
| /** | |
| * Names for network entities. | |
| * | |
| * The sort order for names is the intuitive one for DNS names: sort on dotted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > console | |
| [info] Starting scala interpreter... | |
| [info] | |
| Welcome to Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_55). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> import java.net.{ InetAddress, Inet6Address } | |
| import java.net.{InetAddress, Inet6Address} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/tests/src/main/scala/mesosphere/servicenet/tests/TestDocGenerator.scala b/tests/src/main/scala/mesosphere/servicenet/tests/TestDocGenerator.scala | |
| index f1975a8..7e6416c 100644 | |
| --- a/tests/src/main/scala/mesosphere/servicenet/tests/TestDocGenerator.scala | |
| +++ b/tests/src/main/scala/mesosphere/servicenet/tests/TestDocGenerator.scala | |
| @@ -42,8 +42,7 @@ class TestDocGenerator { | |
| // if instance != subnet | |
| } yield { | |
| val instanceName = f"$serviceName-I$instance%x" | |
| - val instanceAddr = f"$serviceAddr:$instance%x" | |
| - Interface(instanceName, ipv6(s"$instanceAddr::")) |