Tip:
Highlight text to annotate it
X
>> GENTLE: ...and it sort of blocks people. It might be worth if you guys want to actually
follow along moving up to the chairs where you can see me because I can't actually like
stand in away a little. It'd be good for everyone. >> [INDISTINCT]
>> GENTLE: Yeah. So, I'm Joseph, for everyone who can't see me and hear me. I did--I worked
out of this year for--I spend six months at Google. Even most of my friends have lost
track whether or not I'm working at Google at any given moment now. I'm--yeah, so I've
worked for six months at Google. I did an internship at the start of the year and all
on the year before and then I've spent three months recently as a contractor. I started
a week before Wave got cancelled so it's for me been a very interesting time to be on the
team. So, originally the spec for this session, I was going to be explaining how to set up
your own Wave server on some domain and get it better and everything else. But talking
to a couple of people, it kind of seems like a lot of people don't have the code running
even on their laptops so I might just spend sort of five minutes showing how to set that
up. Unfortunately, I can't--I'm not going to show you how to start it up on Windows
because it's a little pain in the ***. But I can quickly show you on a Mac and it's exactly
the same on Linux. So, for the, you know... >> I just want to point out that there is
a documentation for installing on Windows and anything you want, it's just got a lot
of the odd pull on that on setting that stuff up, as well.
>> GENTLE: Yeah. >> But I do all my default on my Windows.
>> I'm sorry? >> I do all default on Windows. It's actually
very... >> GENTLE: Yeah. It all works. Thankfully
full Java and we've got some people who wrote... >> [INDISTINCT]
>> GENTLE: Okay, yeah. Anyway--but, yeah, if you set it all up it does work, but that's--it's--well,
it's--I mean, you've got to grab a run scripts from somewhere, a noted [INDISTINCT] to help
people with that. So, I'll quickly show you how to set it up, the code, and get it running
on my Mac for the people who have Macs in the audience, which isn't a huge number of
you, unfortunately. If you got Linux then it's similar. And then I'll go on to show
everyone how to run a server live-hosted so I'm just going to show you from completely
raw, plain Linux system running on slides first, how to get a server which better--is
up and running. I'm going to move with this reasonably quickly so if you can't follow
along don't worry about it, we're going to be spending time this afternoon after all
the sessions and tomorrow afternoon after all the sessions where we're all going to
be available. And if you want to set up and, you know, give it a try, doing everything,
then there'll be people out who can help you out and show you stuff. And all the documentation's
up there, all I'm really going to be doing is taking this wave that I've shared with
everybody and copying and pasting the commands one by one into, you know, into the console
and then doing them so you should be able to, you know, use it and get everything working.
So, before I start, are there any questions? Yeah?
>> [INDISTINCT] >> GENTLE: The question was [INDISTINCT] stream
working. I can't help you with that, unfortunately. Can--maybe you can chat to Alex or Zoren later.
Alex is the guy who's still rudely chatting behind that door but, yeah, I'm not sure.
I'm sorry. I can't help you right now with that. Okay. So, I'll quickly show you how
to get everything working on my Mac. So that's sort of--so, to be able to federate, I should
mention as well, you need a bunch of different things to be working. I'm going to write on
this white board even though not everyone can see the white board, which is annoying.
But there was a--on top of that wave. To get the server running you don't need much. You
need a server, you need Java, you need the code, you need to build it, you need to run
it. It will run the server. You can connect to it by using your browser. To federate,
you need the following things: you need XMPP, which is a Java server, and you need this
for the servers to communicate to each other. You're going to need a domain name and you
may--going to need to be able to edit that domain name. You're going to need an SSL certificate.
There's a website that hands out free SSL certificates, which is startssl.com. If you
want to use their certificates you need to register. But they're free which is nice.
Ultimately, you can get an SSL certificate anyway that you can get an SSL certificate.
So you can pay somebody money and get one of these one there.
>> There are a certain--certain amount of SSL providers with direct line from Java.
>> GENTLE: Okay. >> Not all them are, sell [INDISTINCT] certificates
are. >> GENTLE: Okay. Yeah, James just pointed
out that not all SSL providers are recognized by Java so it might be worth checking that
whole thing, selling money for an SSL certificate. If you want to use the StartSSL certificates
you're also going to need to be able to receive email at your domain so you're going to need,
you know, an email set-up. I've set this up just using Google apps. You can get a free
Google apps domain at Google Apps thing and connect it up to your domain as long as you
can add MX records to your domain name, which you're going to need to be able to do anyway
to set-up XMPP stuff. And that lets you--that'll then verify that you really do have that domain
and they'll hand you out an SSL certificate that you can use Wave in a Box. So, all of
that stuff is a bit of a pain in the *** to configure and set up but I'll run you through
it quickly. I'll do it now. But first of all, let's get a simple server running on a laptop.
So to get a simple server running we're going to need not very much. If you got Mac then
the only thing you really need to download is Mercurial. James has got pages up on the
Wiki that show you how to install that. Unfortunately, I wasn't prepared to show you how to install
Mercurial but it's reasonably easy. I think you can download and install it. Once it's
installed in your terminal you should just be able to go HG and you'll see Mercurial
spitting out a whole bunch of stuff. Is this big enough for you guys in the back to read?
Yeah? Cool. Okay, so, good. Magic buttons, I can make them bigger and smaller. So the
step one for where you install it is to download and build Mercurial--download and build the
code. So on my Mac I'm just going to grab this line which says to grab the source code
of the other tree. And if you got the code page that's, you know, I just copied and pasted
this from code.google.com/waveprotocol and you should click, "Check out Google," to give
you this line to copy-paste. So I can paste that in there. And what that does is kind
of grab the most recent version of all the source code from our code site and then I
can build it. Doo too doo--yo? >> I downloaded it before and then I want
to update and I've done like HG space [INDISTINCT] but it's just states like the same version.
>> GENTLE: Right, right. Yeah. So, Mercurial is a little bit different from Subversion
and CVS, yeah. It's--yeah, exactly as James said, your HG pull and then go HG update.
It's a two-step process. >> [INDISTINCT]
>> GENTLE: Yeah. There you go. >> [INDISTINCT]
>> Yeah. >> GENTLE: Right. So, this will be done soon.
So for all of the other stuff, I've got a Slicehost account and I'm just going to nuke
this. So this is my wavebang.com wave server, which is currently working and it looks like
this and I've got waves and sound. So I'm just going to nuke the entire machine that
that's running on and build. So I was trying to set this up using Avance 10.4 last night
but I was having trouble. But it seems to work fine at 10.10. I think it might have
something to do with the version of procedure that I was trying to use. I don't really know.
Federation is still a little bit flaky so some things just don't work when they should
sometimes and sometimes you need to reset your server. So I apologize about this--apologize
for this. We're going to try and make this work a lot better in the next few--the next
little while. But if it magically stops working for you then it might not be your fault it
might actually be our fault and you should make a lot of noise on the mailing list saying,
"It's not working," and hopefully people will start to, you know, get all of these stuff
fixed. So I'm going to hit rebuild and this is going to build a new, you know, a bunch
of maverick instance and blow of all of the data MRL done. If you want to do this from
scratch then, if you sign up for Slicehost, then you can just click, you know, all my
files I would like in the maverick. And this is going to give me a new--and since--and
I can login to like that. Meanwhile there, Mercurial is done. So once you type in that
command it's going to make a new directory called wave-protocol that you guys can't see
it at all because of the colors. Let me fix that. Let me fix that. And there's a directory
called wave-protocol right now. I can go into that and I can type in ant. If you type in
ant by default now it's going to go build everything that you need and it'll just work,
which is nice, so. And this does take a little while though, so it takes about five minutes
on Slicehost and it might take a little bit longer on my brand new laptop because it's
got a little precious [INDISTINCT] a few years ago. But, yeah, so you type in ant and it
will start compiling. So I'm going to start multitasking. I'm sorry if that confuses people
because this will take a good, you know, six to seven minutes.
>> I just have one small question. Do you suppose...
>> This should be in inches a little bit [INDISTINCT] >> GENTLE: So, I use the 64. We want to use
the default but it shouldn't matter which one you use. But use 10.10. Use the most recent
one. Don't use the previous Avance image. So what this does is it first of all compiles
the server and then it expands a whole bunch of Java files into the directory and then
it collapses them back down at some other Javas. So this is on my list of things that
I should want to fix when I get around to it because it's got so--but the thing that
really takes time is compiling the client. So, when it says compile GWT it starts compiling
the console client and that's--so. All right. So, meanwhile--so we've got a new box and
I'm going to be able to login to this using my newly writ password. So if I go to my other
tab, SSH as root at... >> [INDISTINCT]
>> GENTLE: Sorry? Well, I'll start off logging in as writ because there's no users on the--on
the machine. So I login to writ of that machine and--oops. I logged in to it before and it's
generating a new servlet so I just need to delete the file. If you did this from scratch
you won't have this problem. You know the man behind the curtain. I'm sure it will connect
and the password is this and I've got a brand new box running. That color is not so good
but I've got a channel that I can do stuff with. So I'm going to start going through
the instructions on this wave and I'm pretty much not going to deviate from this. So if
you want to follow along then open up the Wave and you can, you know, do stuff. So,
first of all, just type in SSH root at the IP so that you can login to it. The first
thing I'm going to do is I'm going to create a user because, as James says, I--logging
in and using a machine is actually quite naughty. So I'm going to add a user called josephg
and I'm going to add it into the pseudo group which is going to let me be able to have administrative
privileges. So this creates me, I'll give it a password and it's going to ask me my
name and stuff but let me get it. So once that's set up, then I can log out and then
I can log back in again as myself. So if you're doing this from Windows, you can grab a program
called--who's on Windows at the moment? Is that a lot of people? Yeah, if you're--okay.
You can get a program called PuTTY that lets you be able to connect via SSH if you don't--if
you're not comfortable doing this stuff. So now I'm going to log in as me and [INDISTINCT]
on me. I'm just going to type this command to make sure that I have administrative privileges.
"Pseudo" means please do this as the writ user and as the CP user. "Who am I?" means
which is am I now and I type in my password it should say that I am indeed if I set--ask
you to do something it's with administrative privileges under writ user. So, that's good.
All right, very good. Alright, so the first thing I'm going to do is I'm going to install
a whole bunch of packages and these are the packages that I'm going to install. I'll explain
them. So, this means in store packages. Default-ADK means to install open J at JDK or a bunch
of default Java runtime environment and development kit so that's Java development kit. Mercurial
is the program we need to be able to download a little source code. Eventually, we're going
to make it so that you can just--you can just click on the download link on the website.
But at the moment that's quite out of date because I'm moving quite quickly so I prefer
to grab everything from source. Ant is the tool we use to build so that's going to build
everything for us. MongoDB, we're going to use to have a persistent user store and hopefully
the data source is going to start using Mongo at some stage. Although, at least at first
it's going to be using files. Prosody is the JavaServer or XMPP Server, so we need these
for federation. And finally, I'm going to get screen so that I can launch it and run
it and leave it running even though when I'm not logged in. So...
>> Just one question, depending on which version we're going to be using, like, I've got the
older data.org. >> GENTLE: Yeah.
>> It's tied against 7.170 but it's not working. It's not built that XML.
>> GENTLE: Okay. >> And at least Ant 7.1.7.1.
>> GENTLE: And which was? >> 871.
>> GENTLE: Okay. >> Minimum version of Ant you use.
>> GNETLE: Okay. So the comment was for people on, you know, video and stuff. Apparently,
if you use an older version of Ant II, for example, like 8.04, the default version of
Ant isn't recent enough to be able to build the code. You need at least version 171 to
be able to build everything. So, yeah, that's something. So I'm going to type in now and
this is going to take a little while but not too long because this is going to download
122 new packages, but it's still fast in the building. So while it's going I should be
able to--right. So my build is finished and actually--hey, that's cool. It's still faster
than the image on--yeah, on slashes. This is one of the brand new Macs. I'm very happy
with it, so. Yeah. >> [INDISTINCT]
>> GENTLE: I'm lucky I favor Apple on the side [INDISTINCT] friends makes it. So, all
right. So, now this is running as it's built. I can just go ./run/server and it's going
to run the Wave server completely with all the default configuration settings. And this
just works. So if you don't--and if you haven't made the configurations by yourself you can
just run it and it should just work. And you can tell that it works because you'd see this
thing. If this is a bit smaller, it looks like that and that's my sort of mental cue
for, you know, it's running and it's all happy. Sometimes you see giant stack traces and if
you see that then it's bad. And that means it's not working, you've done something wrong.
But if you see this like, you know, lots of, you know, slash website things are all hooked
up then you're golden. So once that's running by default it's going to be running on local
host, :9898, and if I go to that, then--it's not working. No, okay. My default is running
on my external IP and not local host. Yeah, my host name/9898. So this is working. The
default user store at the moment is still the fake user, so I think, is it?
>> [INDISTINCT] >> GENTLE: Okay. All right, cool. So I can
register a new user then. So I'm going to register the ASDF user with new password.
Cool, registration complete. I'm going to sign in, ASDF and--woo-hoo, ASDF@sephsmac,
choose my laptop, create a new wave and I can talk to myself which is cool. Yeah, so
that just works. So if you wanted to do all of it, that's, you know, that's how easy it
is to set-up and get it up and running. Yeah. I don't what that's about. I won't go in there.
All right. So meanwhile, let's install all of these packages. And so a whole bunch of
things are installed now including Mongo and you can test if all this works if you want
to. So for example, I can use Mongo and I'll say, "Whoop. I'm connected to Mongo." She
wants you, but you don't need to. Okay, so the next thing I want to do is check out the
source code. And this is exactly the same as what is registered on my laptop so I'm
going to do that. And if the Internet's any faster than it is I would Google--yes, I think
it is. Any other questions while we wait? >> Is it--has anyone used Amazon Images for
this? Is there any reason why it wouldn't work there?
>> GENTLE: The question was, "Has anyone used Amazon Images for this? Is there any reason
why it wouldn't work?" I haven't. I don't know if anyone has. I suspect it should work.
You have? >> Yeah.
>> GENTLE: It's good? >> It's two steps, you set-up security [INDISTINCT].
>> Did you use a [INDISTINCT]? >> I used my Web to Oracle. So, I used an
Oracle [INDISTINCT]. >> Okay, great.
>> We need to break that at [INDISTINCT]. >> But I think I need to [INDISTINCT].
>> GENTLE: No. No, there's nothing special about--of Ant II, I think. That list of all
the packages will be different on different operating systems, but I'm sure it'll be fine.
I mean it runs on Mac OS and Windows as well so different flavors of Linux should be fine
and--yeah. And then, so the answer for people who are on video is that, yes, it does work
but you need to configure the security settings and defaults and everything else, but it runs
well. So now I'm going to build and it's going to take a little bit longer, I think, apparently.
So for me on this box, it seems to take about six minutes to compile everything and that
includes the client. When you're doing development, it's a real pain in the ***. But thankfully,
you don't actually have to compile everything when you're doing development. There's a couple
of things you can do which will speed it up a lot. The first one is that if you set up
Eclipse properly and hopefully--yeah, grab me after, we can show you how to set up Eclipse
properly. I think Leonard's going to run you through quickly how to set it up.
>> A part of it, yes. >> GENTLE: Set-up a part of it. If you set
up Eclipse, Eclipse will actually automatically build every time you save any file. So you
can just develop an Eclipse and then you can hit the run button and it will just run instantly.
You don't have to wait for any build or anything at least for the server. For the client, you
still need to compile some of the witbits, although, to the host [INDISTINCT] which will
compile on the file. Is ZD around? >> Yeah.
>> GENTLE: Yes. So the person to ask about getting hosting a group working is ZD. This
guy back there, he helped me out and I couldn't figure it out because I thought it was complicated.
But yeah, we've all--we should also have instructions up somewhere on the site. Do we have instructions
somewhere? Okay. Well, ZD can hopefully get instructions up as enough people--if enough
people are bugging about it, sweet. >> We definitely run through it on Thursday.
>> GENTLE: Sorry? >> We will definitely run through it on Thursday
evening hopefully. >> GENTLE: Great, yeah. We'll run through
it all completely on Thursday when we have the [INDISTINCT] session. Cool. Okay. So while
that's going I'm going to talk about a couple of other things. So as I showed you on my
laptop, if you want to just get the server up and running then this is pretty much what
we need to do and I can run it. So I'm going to run you through Federation. So for Federation
we need a bunch of different things. We're going to need--we're going to need a domain.
So I've got this domain here which is my configuration for wavebang.com. I've already registered
it. I've already set-up, as you can see the MX record which lets me receive email on this
domain, and I've set that up and pointed that to google.com. So to Google Apps domain because
this is free and I can do it. You're going to need to be able to receive email on either
webmaster@yourdomain or postmaster@yourdomain. So I set this up by going manage this domain
and making my user name an alias for webmaster in the Google Apps configuration stuff. It
will be different if you use different email providers. I can show you how to do that later
if you want to. I've also obviously got slicehost, which is running the actual server. So the
first thing I'm going to do is I'm going to take the IPaddressclick, don't want to have
to get copying it and pasting it. And I'm going to make a new DNS record in my domain
so that I can just type in wavebang.com and it's going to take us straight there. So I'll
do this while it's compiling. So the sub-domain is nothing and different DNS things will look
slightly different so don't worry. I want an A record which means that this is the authority
record for this domain. And I want wavebang.com to point to this IP address, which is the
IP address of my server. So I'll save that. And now you could see that here, it's the
IP address of my slicehost server. And from my terminal on my machine, they're not from
the, you know, we haven't installed the tools here, but from Linux you can type in dig A
wavebang.com to see if it works. And it should hopefully say--it might take a minute to refresh,
unfortunately. Anyway, at some session we'll be able to--or go ping wavebang.com. All right.
It might take a couple of minutes for that ripple through. But when it does we should
be able to go to wavebang.com and it will work. It was working instantly and so, which
is a shame. Okay, so we're nearly, nearly finished the compiling grid. So yeah--so I
want to set that up and that's going to be useful. Another thing that we're going to
need to be able to have access to is StartSSL certificates. So I mentioned this before the
talk. To be able to--oops, I'm going to--just go to the main page in this. To be able to
get an SSL certificate, you can get free SSL certificates from StartSSL and this is really
useful. Unfortunately, it doesn't work in Chrome. So if you want to use this site, you
need to use it either from Safari or I think Firefox. It's [INDISTINCT] Chrome though,
we're bugging the site. The way they use authentication stuff isn't supported by Chrome. So yeah.
So, what you want to do when you go here is click on sign-up, and you can fill out all
of your personal details and then they give you--so I'm going to show you that. I've already
done it, it's just--it's a pain. All right. I'm really excited. You type in all of your
details and they're going to give you a download link. So, what you have to do is you download
it and you're going to get a little download link with some randomly-named file. And on
the Mac, you can just double-click on that file and it will open up the keychain, sort
of like this. And there it is, StartSSL, Start.com free certificate, and then you can close that
and it's all good and it works. So I'm just going to delete again. But don't delete it,
that's just because of my weak configuration. Are we done yet?
>> [INDISTINCT] >> GENTLE: So yeah, we'll get there.
>> How much RAM are we going to be able to show?
>> GENTLE: So, this machine has 512 Megs of RAM, but it might work with 256 Megs which
is--no? No good? Okay, I decided that I wanted 512 Megs of RAM for...
>> So, when I run it in Harmony, it usually takes about 12 minutes to do.
>> GENTLE: Okay, maybe this is RAM limited then. Yeah, it could well be, but it's getting
there which is nice. And when you see this compiling permutations thing, it's good. There's
also another trick which is really useful when you're developing. If you want to build
a GWT client, you can type in @ compile_gwt_dev. I might write that down on the white board,
or maybe I maybe I could write in Wave. If you want to, you can go compile--yeah, compile
gwt_--and--I'll write it down. And that does a development build which will build much
more quickly, and it also gives you a console underneath at the one of the client which
let's you see the given information. So, if ever--if the client crashes for some reason
it's quite useful for us to be able to see that work. Yeah, there we go. It's this. Come
on, come on, faster. So where's everyone from? Is--most people are from the States? So who's
not from the U.S.? Okay. You guys are from Australia and the Netherlands? You are from
Germany? Okay. >> Finland.
>> GENTLE: Finland. >> Singapore.
>> GENTLE: Singapore. Anywhere else? No, international people? Is my accent annoying to understand
for you guys? >> I find it terrible.
>> GENTLE: Yeah, I've had some American friends who--yeah, who I pretend to speak in an American
accent for. It's probably terrible and really, like, patronizing but it's...
>> We have to put up when Americans try to pretend to do Australian accents. So why can't
we do it the same way around? >> GENTLE: Yeah. So yeah, I can pretend to
be an American if you like, I don't know. >> Do it, I like it.
>> GENTLE: Okay. >> Come on, dude.
>> GENTLE: Yeah. >> Is this being streamed too--this part of
it? >> GENTLE: Yes. Yes, it should all be streamed.
>> And so, what if something happens during the stream?
>> [INDISTINCT] >> GENTLE: So yeah. The question was, "Is
this being streamed as well?" And if you are subscribed to the Wave-Protocol mailing list,
then Pamela sent an email. >> Or you can check our Twitter account with
that. >> GENTLE: Yeah, Gmail doesn't really run
it very well with this apparently. >> Is the Google Wave link [INDISTINCT]?
>> GENTLE: I could open this up and watch a video of myself. But yeah, so we've got
a video, which is working. Impressive, okay. >> We've got an ad.
>> GENTLE: An ad, let's not watch that. >> Yeah, an ad.
>> GENTLE: Okay. This is a lot faster when I did this last night. It's kind of annoying.
I don't know why that is. So, I'm sorry about the wait. Are there any other questions while
we wait? Yes? >> Can you explain the certificates?
>> GENTLE: Sure. What was the other question? I'll take them a couple at a time.
>> MongoDB, is that--that's something you will set the configuration or on this current
field test completely? >> GENTLE: So, the question--that question
was--which is an easy question; I'll explain that on a minute. The question was, "MongoDB,
do you need separate configuration for that?" The current bill by default will look for
MongoDB running on the local machine. And if you just install it on Linux then it will
run on the local machine on the default port. So it doesn't need any configuration at all
if you just want to use the regular plain old settings. So you can just install it and
it'll just work, and everything's fine. So, our build finally succeeded. Whoo! It took
8 minutes, which is longer, and the GWT part of it took, what, 475 seconds, whatever that
is, it's probably the most of it. But if we look at our directory now we've got all the
files that I had on my laptop and I can go run-server. And here we go, it's doing that
thing where it works. Let's see if wavebang.com is working. That's really annoying. I hope
that's not going to be annoying later. So, a little demo about--so I should be able to
now go to the domain. Unfortunately, because the DNS recorder hasn't updated yet it's on--it's--I'm
not going to be able to send in to wavebang.com, but I can type in the IP, :9898, and up I
get a brand new Wave in a Box instance. So, I can register a new account, and I'm going
to register seph@wavebang.com, then a password, thanks to my account. And I can log in--and
there we go, just like on my laptop we've got Wave in a Box running, which is cool.
But I just want to federate. You know, notice as well where it says, seph@boxtestone, which
is the name of this computer. So that's not what I--what I want, because I want this to
be running on wavebang.com. Also, this is currently at default, is set not to use the
new USE_SOCKETIO code, which--who wrote the USE_SOCKETIO code, are you here?
>> TED: The JavaScript portion by Game O'Reilly, and the server by me.
>> GENTLE: Okay. Cool. All right. So--yes. We don't have--what's your name again, I'm
sorry? >> TED: Ted.
>> GENTLE: We don't have Ted's--Tab or Ted? >> TED: Ted.
>> GENTLE: Ted. We don't have Ted's new USE_SOCKETIO code running by default so this will sort
of might work in Firefox. So these things, we can fix pretty easily by just doing some
configuration. So, that was running. So configuration. So, the first thing I want to do is copy the
example configuration file across the run-config.sh. So, if I kill this with Ctr+C--I'm going to
copy run-config.sh.example to run-config.sh, and then I'm going to edit it using my favorite
editor--you can use whatever you like. I'm just going to set an option so you canóso
you guys can read that. Okay, so this is the big configuration part for Wave in a Box.
There's a lot of things in here that you can just completely ignore, which is nice. We
should probably mark them somewhere. You also can't see my cursor there but at the moment
I'm on this line here. So the first thing I'm going to change is the WAVE_SERVER_DOMAIN_NAME.
Actually--no, the first thing I'm going to do is remove these two lines. If you leave
these two lines and it breaks, and says, "Hey, stop. You need to configure this before running
it." So, I'm just going to delete these two lines and then I'm going to come down here,
I'm going to go change the WAVE_SERVER_DOMAIN_NAME, instead of being example.com, to being wavebang.com.
All right. So, the public IP address is currently set to whatever your computer name is, :9898.
If you want to make this run on port 80 or something, you can--if you want to you can
change it here, and then run the server as the root user, that this is ran upon. When
we have good running configuration like start-up scripts for Linux and Sun, then hopefully,
those scripts will automatically run it on whatever port you want. So--but for now it's
probably best to leave it on port :9898. So I'm going to leave that alone. What other
things do I see in my Wave? So I should pull in my units. So, I've changed my domain name,
if I want to I could do a public IP address to hostname:80. I'm also going to have to
come down here for now and say ENABLE_FEDERATION equals false, which is sad, but it'll crash
when it sets up if I haven't configured all things I need to do for federation. So, I'll
disable Federation and also going to come down here and--so, what kind of user store
do we have at the moment? Okay, at the moment the user account store is memory, which means
every time the server restarts you'd lose all of your users that have been set up, which
is kind of annoying. It does this for other waves as well which is sort of more annoying,
but we should fix this really soon now. So I'm going to come in here and I'm just going
to change this to, say, MongoDB, and USE_SOCKETIO, which is the new code from Ted, equals true.
So, this means it should work on Firefox and the accounts still in MongoDB and it's stored
and it still remember my user account so I won't have to type in every time. So I'm going
to save this and then I'm going to run it with run.server again. Doo too doo.
>> How do you stop the server? >> GENTLE: Ctrl+C.
>> I tried it and I tried to do it again [INDISTINCT]. >> GENTLE: It shouldn't leave anything behind.
What operating system... >> 10.2.
>> GENTLE: Ten-two? It should be okay. I don't know. You can go kill Java or something if
you want to. It's fine. >> It's also says if you want to go delete
server. >> For those that want it, I do have a demo
script that I can send up everyday, so I can just type, 'CMS_WAVE_START.
>> If you go to diamond stop script it'll stop, stop script, that'll be great.
>> Yeah, that'd be great. >> And then you'd need some tweaking whenever
you're using that because there's some [INDISTINCT] I don't call though [INDISTINCT].
>> GENTLE: Okay. >> [INDISTINCT]
>> GENTLE: So, yeah. The comment was, Ted's got a run script for a bunch of Avance which
works. So, yes, I'll make up a code with you; we'd welcome it in the code base somewhere.
If you can--if you're happy to maintain that and throw that and, you know, make a card
review. >> Yes.
>> GENTLE: Make them clash. >> [INDISTINCT]
>> GENTLE: That'd be cool. Alright, so I'm going register myself user again because I
changed the user store app. And now I can sign in and this will now be consistent so
I can sign as mainly with the password. Notice that now it says seph@wavebang.com which is
the domain I configured and, you know, since it'd be better. If somebody just logged in
as me and make a wave. "Hi. Hi, Alex." There, it's--Alex logged in as himself and added
me onto the Wave. So, I can talk to Alex and I should be able to as well load this up from
Firefox, which is exciting for me. I'm logging as myself. Cool. Thanks, Pamela. Yes. So,
it's all working and it's all, you know, maybe. [INDISTINCT] All right. I think Pamela will
play out with it. Well, got to get back to work. Okay, so now I'm going to show you guys
how to set-up Federation. So this is what we need to do all of those bits. So, the first
thing we need to do is DNS because this can take some time to set up itself. So I'm going
to set up--you need to set up an SRV record which looks like this. There's instructions
on the Wiki, on the code review page on one of the Wikis on how to do all of these and
what it all means and everything else. And the same is true for pretty much this entire
document. So, if it doesn't work or if you are curious about why the command looks like
it does, then feel free to go onto Wiki page and look it up or just bug any of us during
this session, or post on the waveprotocol manual so people can help you out. For me,
this is going to look like this. I'll come in here I'll add a new record. The type is
server and I need to paste--and so the sub-domain is that, which is a magical XMPP sub-domain
which is going to make the JavaServer be able to work. And in the destination field I copy
and paste all of this stuff.
So, the final entry is the--the final two entries are the port that the JavaServer is
running on and the--and your service domain. So this server is just wavebang.com so I can
just type in wavebang.com here and I can save. You can also type any applicator through the
server and [INDISTINCT]. I have a space in the end of that. Cool. And now the SRV record
is configured which is nice. It'd be really nice if these domains started working. No.
No good, no. It was all working basically instantly last night so I apologize. This
is--Federation may not work by the end of this talk. If I go to the SRV record now as
well, I should be able to if it was going to work instantly. After that, then that is
working, which is nice. So, the server code is [INDISTINCT] wavebang.com. The wavebang.com
is unfortunately coming our way. >> Can you show the record [INDISTINCT].
>> GENTLE: Yes. I'll just have to wait for it to operate. So, unfortunately, Federation
won't work until then which is sad. All right. So the next thing I'm going to configure is
XMPP. So, this is the JavaServer. But before I do, I'm going to answer Pamela's question
because--I'm sorry, what about you? So you were curious about what--how SLL works?
>> PAMELA: Yes, generally. >> GENTLE: Okay. So, SLL is the encryption
technology. SLL certificates--sorry, let's two parties communicate to each other securely.
The reason why certificates are needed is because I can just pretend to be anybody and
then say, "Hey, I'm me. I'm here." Start an encrypted session. So, yes, so you'll need
a certificate which is signed by a trusted third party. So the third party says, "Yes,
these encryption keys are really from Joseph." And then I can say, "I can encode things using
those keys and everyone else can decrypt them." And they'll know it's definitely for me because
I'm the only one who knows how to encrypt keys from Joseph. So, we use this on a whole
bunch of different places in Wave in a Box. Or at least we intend to, some things aren't
working just yet. The most important place is that we sign all the deltas. So when you
send a delta to you, attach some text in it in a Wave, every key start that I press it
gets signed using my server certificates. When I says, "Yes," that really was Joseph
typing these keys. And when it sends them on to wavesandbox.com or to acmewave.com or
wherever, then all the servers can check and make sure and they can tell that those key
strokes were really sent by my wave server. And my wave server is trusting in saying that
it was sent by me. So that gives you the all the nice security properties the wave has.
SSL is also used between the servers to be able to do the XMPP connection. But unfortunately,
that's not working in wavesandbox.com at the moment. So I'm not going to show you guys.
I'm not going set that up, so that wavesandbox.com Federation works. But of course, if you turn
that off then it means that those--yeah, it means there's potential for abuse and listening
to ops in the middle. >> Can you try and see if you can put the
boy box from one of these? >> GENTLE: Is this my--louder here or...
>> Yeah. >> GENTLE: Am I any louder now?
>> Yes. Yes, you are. >> GENTLE: Is that good?
>> Good. >> GENTLE: Okay. Cool. Testing, testing, sounds
[INDISTINCT]. All right. Yes. So we're using that and also SSL should be working from your
browser and the Wave in a Box server. But again--and that's what--why they use the HDVS
in googglewave.com but that's still not working in the federating server. Okay, so that's
all--that's all set up. So let's set-up XMPP. So there's a bunch of different XMPP servers.
I'm going to show you setting it up in Prosody because we've already got--because that definitely
works. So, I've installed Prosody and it's running already at the moment just from having
been in that upkit line. So I'm going to have to edit the config file for that. So I'm going
to kill the server and I'm going to type in--I didn't type that, you know. I'm going to go
sudo, so, do as the writ user, actually. I'm just going to become the writ user. So, sudo--I
mean, become the writ user. Again, my favorite vim/etc/prosody.cfg/lua. Let's just copy and
paste that into the Wave release. So this is the Prosody configuration file. It contains
all sort of stuff that we can just completely ignore. So the first thing I'm going to do
is, well, I'm going to copy and paste all this stuff. Componet_ports means which port
does the Wave in a Box server communicate on to the proxy server and I paste that up
here. >> [INDISTINCT]
>> GENTLE: Oh, CSR, sure. Yeah, yeah, there you go. Sorry about that. So it's on that
port. I'm going to disable TLS in Prosody because if you don't then it doesn't federate,
at least with wavesandbox. So, you can disable things by coming it out with just the dash-dash
thing that you see in all of the comments above. So then, I'm going to do these things.
I'm just going to copy and paste these lines. So this says that there is a new--oh, I'll
just write on the bottom. Oops. Let's paste it here. So this says there's a new component
called wave.wavebang.com, which is going to connect to you. It's secret so the Prosody
server here, the Java server and your server need to have a shared password that only those
two know. And my password is going to be, "Internet." And you have to just pick some
password and copy and paste it both in the configuration for the Java server and in the
wavebang server configuration file. Finally, wavebang.com as a domain, it's enabled so
if you're going to be serving wavebang.com waves you should know. So we'll write that
and then we'll click that and then I'm going to restart Prosody. So we do that like this,
"prosody restart," and that's just going to restart the server. I didn't do that last
time. Alright, once we edited that then we can reset. Alright, so then I'm going to have
to put this password into my Java my--sorry, my Wave in a Box config file. I need to tell
it that the place for the wave where the XMPP server is the local machine and the secret
is Internet. So, stopping the writ user and search a thing, me again, so I hit control
D to do that. Let's go down to where the XMPP server secret is. It's not as an open as me
instead. Internets. And the server IP for some reason, yeah, this doesn't work. And
if we say that it's just on the local machine then it works fine. You can leave all of the
other stuff. Don't worry about it saying, XMPP_SERVER_ PING.wavesonbox.com. That's still
fine. Alright, so now if we do that then that's the XMPP file. So, SSL certificate. So we're
going to need the SSL certificate so the server can find messages. So there's a little script
that checks to see whether the certificates will setup for play which is the check certificates
script. So this is going to like tell me what's currently burking in the certificates. So
if I run this, first of all it's going to say that this random configuration option
set defaults and it's reset to true. So let's just go in and fix that. Type the true and
it's reset to false. True, true, true is coming about it later on in the Wave. And if I run
it again it's going to--there you go, it's going to say that my--all my keys don't exist.
So I'm going to need some SSL certificates. I'm going to need some SSL keys. And I get
these from the StartSSL site. So, I've already signed up and I've already clicked on that
thing so I can click the authenticate button and this is going to log me in to the StartSSL
site as these that I've created. Thank you. "Howdy, Joseph Gentle! Thanks for choosing
StartSSL." Blah, blah, blah, blah, blah. So there's two things that you need to do here.
The first one is you need to prove to the StartSSL site that you really are in the domain
that you specified. And the second one is you need to actually get a certificate. So
you need to click on these things up here in the opposite order. So the first thing
you need to do is open up the Validation Wizard to validate you in it. So I'm going to--and
I should mention as well that I'm just following along now so I'm doing this a little bit out
of order. I'm coming down to the StartSSL dance with you. So I'm going to go to Validations
Wizard domain name validation. Continue into the main name. So the main name that I want
is going to be wavebang.com and I hit continue. What this is going to do is it's going to
send me an email and the email's going to say, "Hey, here's the code," and I'm going
to copy and paste that code back into the website. So I need to pick--I need to be able
to access one of these four email addresses, but I'm going to access the webmaster@wavebang.com
address and it's going to send me an email. So if I go back to my email--here we go. Paste
this in. Validation Success. I've authenticated the main wavebang.com. So now this site will
be able to give me certificates. So finish that off and I can go to Certificates Wizard.
So now, apps the next little bit in the wave down here. So I need a Web Server SSL/TLS
Certificate. Okay. So I'm going to need a key. So I'm going to just jump back up here
to these arbitrary OpenSSL commands now and show you them. So what I'm going to need to
do is generate a secret on my server. And I'm going to use that key and then I'm going
to get the OpenSSL server to sign and say, "Yes, this really is," you know, "wavebang.com
that's," you know, "That generated this key." So I need to execute these commands. This
is slightly different from what's in the Wiki page--what's in the Wiki page, but it does
all exactly the same thing so don't fret that it looks different. So the first one says,
"Generate new key," and it's going to ask me for a password. This password doesn't matter
at all so I'm just going to start in like AAAA or something. AAAA, AAAA. And then I'm
going to copy and paste in these lines. So it's going to generate me a key called encrypted.key
and then this one is going to say, "Take the key and turn it to a slightly different format."
AAAA, okay. And this one says, "Take the key and decrypt it and produce a--" this one says,
"Take the key and produce a certificate signing request sp produce something that I can ask
StartSSL to assign." Okay. Okay, a country code, full name. So you can enter in stuff
and all this stuff. StartSSL doesn't actually check any of it but most of the distributor
registry authorities will. But really, really, really important is note that common name,
your name. The common name field must, must, must, must, must otherwise everything is going
to break and it won't work, the wave.whatever-your-domain-is.com. Actually, if you don't do any of these stuff
it won't work so I guess there's no point emphasizing any particular stuff. It's going
to be wave.whatever-your-domain-name-is, wavebang.com, and then--yes?
>> Actually, as soon as the cell server will write everything you type in there and ask
you--one of the last steps is it says, "You must provide a sub [INDISTINCT] wavebang.com
>> GENTLE: Yes. >> So it validated in this little box and
I said, wave. >> GENTLE: Yeah.
>> and if you don't do that it won't work >> GENTLE: Yeah.
>> And basically it gives you a sub-domain plus a start up, StartSSL certificate.
>> Okay. It'll put blinds.com in wave that on the certificate.
>> GENTLE: Yeah, yeah. >> It writes everything you put in so.
>> GENTLE: Yeah, but... >> But it let's you run with it.
>> I think [INDISTINCT] also has to say that domain as well and it, like, the wave.whatever-your-domain-is.com.
>> I've never tried to... >> GENTLE: Yeah.
>> ...compare to see what would happen though. I mean that is, you know, that they claim
that they take, drop everything in the certificate except...
>> GENTLE: Right. I think they just don't check it. Anyway, yeah, cool. Yeah. You guys
can't see much of the files, but the important file here is this request.csr file which is
generated, yeah. And thanks for that, by the way. Yeah, it's good. So the request.csr file
is to request that we're going to generate and get the StartSSL signed. SSl.key is the
actual key. And I can actually do these but they're not going to be that meaningful. That's
the key. And this is the request. So the request is this long. So what I'm going to do is go
to--go back to the StartSSL site. So it's going to--it can generate me a private key,
but I'm not going to. I'm just going to skip that step because I've already generated my
own. And I get to copy and paste my CSR file in there. So I'm going to take this, and including
the bits in the top and bottom. Go and paste it in there and hit continue. And it's going
to--yeah, it's going to ignore all the fields except for the--I think--I'm pretty sure it
does check the common name field, and says it received it. Continue. So the Wave.***
domain is the one that I'm going to be adding and using. And in here, I have to type in
wave.wavebang.com as well. So this is the domain that, you know, that it's going to
sign me for. And so, whenever--all my deltas are going to be signed for wave.wavebang.com,
which is what it--they have to be; wave.whateveryournameis.com. So, this is going to throw me up an hour,
because I've already this before yesterday. But for you guys, it's going to say, "Thanks,
here's another textbox that you can copy out--copy and paste out." And what you do is you copy
and paste that file back out into a file sitting on your server, and the way that you do that
is you go cut to--let me check my notes. You go cut to startssl.cot and then you copy and
paste all of the junk that it gives you, and then you hit control D or B and that means
I'm done. And so, that's going to generate me the studio file. But because I did it myself
before, I'm going to have to copy the files over from my computer. So, if only I had some
stand to hold this microphone in. So, this is going to copy in my files to wavebang.com,
and maybe it'll work. Hey, the domain is working, I think. Yeah, okay, so it's copied some keys
that I'd--here are some. I forgot I copied some keys in, and I'm just going to copy those
keys into this directory. Okay, so those are the keys I made, but for you, you want to
create your own key files and you need to create the key files you start the first time.
So the .CIT file is the certificate itself. And once I've done that, I'd need to do one
final step which is to tell the configuration stuff that that's where the keys are. And
that--and I also need to get this. So the key is signed by another key which you need
to have for it at all to work. So I'm going to type in that command which is going to
download a little file from status SSL website, which is another key. I can type in this which
says, "Please verify the key that I have with that other studio file will work." And it
says, "Yup, it's all signed and everything is hunky-dory." I don't think I've ever used
the word hunky dory before. >> Actually, it's very good in troubleshooting?
>> GENTLE: All right. Okay, so my private key file, this I called ssl.key and my certificate
filename list has to be--and even though it looks like you only put one thing here, you
actually have to put in both the certificate file and that other little file we just downloaded.
So, SSL.cot and that other file, we'll just go with that. Okay. And now if I run check
certificates, it should say "Success." All certificates are good. Are there any questions
with that whole SSL bit? I know everyone seems kind of asleep and tired and bored and it
is a very boring dry process and I apologize for that. Unfortunately, it's important for
crypto stuff, which is important for security. If they run happy or, at least, you know,
ambivalent about the whole next, next, next game. Cool. Yeah. Yeah.
>> Will you start using [INDISTINCT]... >> GENTLE: Yes.
>> [INDISTINCT]? >> GENTLE: It's on Ustream and also it's also
being recorded as far as I know. >> Yeah, so, we'll--we'll be publishing on
YouTube versions of the videos that are higher quality and the user [INDISTINCT].
>> And you can--you can attach that to the Wave.
>> Yeah, it'll probably take me couple of days to get them online to YouTube afterwards.
So, right now, I'm just posting the two files [INDISTINCT] and stuff, but we're recording
everything. >> Great.
>> GENTLE: Yes, so question was are all these videos being recorded so that you can just
watch all this stuff later when you're actually doing it and the answer is yes. We'll put
up high quality videos, which are being recorded by the--that little camera over there for
you guys to watch and click, you know, and watch and then hit pause every time I do anything.
Okay. So now, that certificate is setting up--set up, so I should be able to run my
server. And I also should also--that would've been really bad. Enable Federation equals
true, so this should turn that on. "/run server.sh." I think it works the first time in the demo.
So, now the server is running again and Federation should be enabled on it. So if I go back to
wavebang.com, those Waves don't exist anymore around because we aren't storing any Waves
yet. Sign in as me and I'm going to log in to acmewave.com. Okay, let's back it up on
some other Waves. Cool. Let's see if this works. So, I'm going to create a new Wave.
In my server, it's going to say its sending discovery requests back in Wave.com. And this
is the stressful moment where it's probably going to break. And it's doing something.
And it might be a good thing. I don't think it is. No, it doesn't look like it's working.
I suspect when I go in here. No, it's not working. Right. It's not connecting to acmewave.com.
I'm going to try wavesandbox.com because that might work. No, I don't know what these errors
mean. All right, so this is not going to work. I suspect I've forgotten some little step.
Yes, it's not working. All right. So, if it doesn't work, in the likely event that it
doesn't work, here are some things that you can do, because I was mucking around with
this a while. So, first of all, I want to check to make sure that my Wave server is
actually talking to my local JavaServer, my local XMPP server. So I'm going to become
the root user again and there's some log files that the XMPP server generates. So, if I look
at "/var/log/prosody/prosody.log," then it's going to say that I started up and then it
should say something saying I connected to the Wave server that you've just configured,
but it's not. So this is--this is where the problem is. My Wave server isn't talking to
the JavaServer. >> It's almost like they're tying not to [INDISTINCT]?
>> GENTLE: Yes, it looks like it didn't start up again. It's not even in the log in information.
>> [INDISTINCT] we've just the program process [INDISTINCT]?
>> Try stop and [INDISTINCT]. >> GENTLE: Try what? Sorry? Stop and start?
>> Stop. >> GENTLE: I'm still not getting anything.
I don't know whether it's a... >> First, how do you use this?
>> GENTLE: Does it--will it automatically figure out which configuration files? Error,
Andrew Robinson. >> [INDISTINCT].
>> GENTLE: Sorry, I'm going to let my user be able to read the first [INDISTINCT] file.
Sorry? It's [INDISTINCT]. Yes, yes. Absolutely, thank you. Information job, actually, it's
config file. All right, so this is the demo I got. It should work for you though.
>> Just--you mentioned several server. >> No x plus s.
>> GENTLE: Oh, yes, thank you. I should just be able to go ahead and do that...
>> Should be [INDISTINCT]. >> GENTLE: All right. So your data file is
through var/lib/prosody. So I might not actually get logging now because I might not have permission
to write to the load files as well. Maybe this will work or maybe it won't. Okay. Well,
it looks like Prosody is not working for me today, so that's sad. I will try it for one
more brief moment and failing that, I will give up. But that should work for you guys.
So we've got a session this afternoon where we'llówell, we've got a session after everything
this afternoon, so if you want to get your server working or if your server doesn't work,
then you can come to either me. Soren is also a master of all of this stuff and you can
ask us about how to make Federation work properly. It was working yesterday and it was working
this morning as well with my old configuration file. Actually, I'm going to try one last
thing and maybe this will work and maybe it won't. And if it doesn't, either way we'll
go for lunch afterwards. So I think this configuration file might be bad or I might have done something
wrong. >> Soren, was it you who put the [INDISTINCT]
active lib configure on the [INDISTINCT]? >> GENTLE: Yes.
>> That's a very good configuration, so you might want to be able to grab that, and just
spin it, if you will, a moment. >> GENTLE: Yes.
>> [INDISTINCT]. >> GENTLE: So here's a Prosody configuration
file I prepared earlier and let's give that a try. That's better. That's much better.
It usually doesn't bring out everything if you're lacking information. I might have done
something wrong. I'll share it with you guys these good configuration files that I've made
and--as well and you can use them to base off your configuration files if you want to.
So is Prosody running now? Yes, it is. If I "cut /var/log/prosody/prosody.log." Hello,
and welcome to Prosody. Cool. We might be working now. Run server. So I'm also going
to run this in the screen session. So in the unlikely event that it works, then I can disconnect
from this--I can just close this terminal and it will keep on running after. So this
is Wave in a Box starting up and in another console, I'm going to say "cut/var/log/prosody/prosody.log"
and it says... >> Server disconnected.
>> GENTLE: Server disconnected. It got--it successfully daemonized. You've got a Java
connection and Wave.wavebang.com authentication failed.
>> Your sequence is probably wrong. >> GENTLE: My sequence probably wrong in that
configuration file; absolutely right. I'm sorry for keeping you guys. So, this is the
state of setting up Wave in a Box and getting Federation working at the moment. So we hope
to, like, do a whole bunch of stuff to make this much, much nicer soon.
>> If anybody wants to write a script that will run on the stuff that'll allow us to
just run through these things, it would be great.
>> Yes. Come on. Come on. Component authentication successful. All right, I'm going to try--come
on, come on. So, there you go. All right. So, sign-in as me. Let's create a new Wave.
Oops, that was me. In our logs, we see--it's got your request is--it's something, no. Maybe.
Sometimes it takes a little while before it pops up anyway. But it looks like it's not
talking to acmewave.com, which is sad. Anyway, we're very close and it's probably only a
small change, and I can show you guys later when I fix that. But that's setting up Wave
in a Box. So hands up everyone who's going to get it working or has it working on their
laptops. Yes. >> Joint.
>> GENTLE: Hands up, people who got it working on their laptop already.
>> Have what? >> GENTLE: Have Wave in a Box working?
>> No Federation. >> GENTLE: No Federation, just the server?
Cool. That's a whole lot of people. So the people who have your hands down--keep your
hands up, okay. The people that have your hands down, look around the room. All of these
people can help you set it up if you need to. Talk to James and talk to Anthony Watkins
if you want it set up on Windows. I don't have Windows here. So even if I--even if I
could help you a lot, I can't show you things. But yes, so these--all these people can help
you get it all set up and working, which is great.
>> [INDISTINCT] turn around. >> I want to have [INDISTINCT].
>> That's acmewave.com in case you're wondering. I'm sorry to get your hopes up. Yes, I can
try it again with Wave Sandbox. This is a long shot now. No, it's not. Not happy. Error
code undefined condition. So, yes, so we want to make this all a lot easier and make this
lot better and if you guys get Federation working, then show and send us your config
files. Help us out. This would be great and we can make the server look better. It's still
very much early stages so, yes, get involved. But that's me done. I think there's lunch
at the back of the room and I'm going to ahead and get one.
>> Yes. Thank you, sir.