Button Button

From yuri at sims.berkeley.edu Thu Jun 12 08:00:37 2008 From: yuri at sims.berkeley.edu (Yuri Takhteyev) Date: Thu Jun 12 08:08:56 2008 Subject: [Sputnik-list] sputnik earth on kepler 1.1 Message-ID: fa4efbc00806120300x2dce3200w9588d90336aa77e7@mail.gmail.com

Now that kepler 1.1 is out, I made a set of Sputnik rocks to go with it. This is based on the recent "Earth" code, with all the changes that Jim and I did in spring. This is a first stab at a release and might have some minor quirks, but this should actually work better than the last release ("Dish of the Day").

To install, you would need to first install Kepler 1.1 into some directory. I'll assume it's ~/sputnik/:

mkdir ~/sputnik
cd ~/sputnik
export SPUTNIK=`pwd`
wget http://luaforge.net/frs/download.php/3468/kepler-install-1.1-1
bash kepler-install-1.1-1 --prefix=$SPUTNIK --without-readline

Then install Sputnik:

./bin/luarocks --from=http://sputnik.freewisdom.org/rocks/earth

install sputnik

Make a directory for storing the data:

mkdir wiki-data
chmod -R a+rw wiki-data

Create a sputnik.ws file in $SPUTNIK/kepler/htdocs/sputnik.ws:

require"sputnik"

return sputnik.new_wsapi_run_fn{
   VERSIUM_PARAMS = { '/home/yuri/sputnik/wiki-data/' },
   BASE_URL       = '/sputnik.ws',
}

MAKE SURE TO REPLACE /home/yuri/wiki-data/ WITH THE RIGHT PATH.

Start Xavante:

./bin/xavante_start

Then access Sputnik at http://localhost:8080/sputnik.ws

We removed the old requirement of registration, so by default anonymous users can edit any non-config pages. Note that there is some spam protection through honeypots and hashed fields.

If you want, however, you can introduce more control.

  1. You can add ReCaptcha:

    ./bin/luarocks --from=http://sputnik.freewisdom.org/rocks/earth install recaptcha

Then go to recaptcha.net and get yourself a pair of API keys. I'll refer to them as PUBLIC and PRIVATE. Then change the last function call in sputnik.ws to:

return sputnik.new_wsapi_run_fn{
   VERSIUM_PARAMS = { '/home/yuri/sputnik/wiki-data/' },
   BASE_URL       = '/sputnik.ws',
   CAPTCHA_MODULE = 'recaptcha',
   CAPTCHA_PARAMS = { PUBLIC, PRIVATE},
}

REPLACING "PUBLIC" and "PRIVATE" with your recaptcha API keys.

This will do two things: anonymous users will be required to enter captcha to edit and new users will be required to enter captcha to register.

  1. You can require email verification for new accounts:

    return sputnik.newwsapirunfn{ VERSIUMPARAMS = { '/tmp/sputnik2/wiki-data/' }, BASEURL = '/sputnik.ws', CAPTCHAMODULE = 'recaptcha', CAPTCHAPARAMS = { '6LdbBAIAAAAAAJnEResrcRMM8TMyilXbvpOoW0E0', '6LdbBAIAAAAAAMbAygU7qCR3sfMkdcirOPbxT0OW'}, REQUIREEMAILACTIVATION = true, SMTPSERVER = "localhost", --SMTPSERVERPORT = "25", --SMTPUSERNAME = "yuri", --SMTPPASSWORD = "pa$$w0rd", }

Note that for this to work you would need to have an SMTP server.

  1. You can block anonymous users from editing any nodes.

Create an account called "Admin", log in with it, then edit @Root and uncomment the two commented lines in "permissions".

Note that in general there is now a concept of "admin" users, who can do different things and usually see a different edit form. By default, only "Admin" is an admin. However, once you are logged in as "Admin", you can make any user an admin by editing "passwords" and adding "isadmin='true'" to their record.

  • yuri

-- http://sputnik.freewisdom.org/

From carregal at fabricadigital.com.br Thu Jun 12 12:29:46 2008 From: carregal at fabricadigital.com.br (Andre Carregal) Date: Thu Jun 12 12:38:00 2008 Subject: [Sputnik-list] sputnik earth on kepler 1.1 In-Reply-To: fa4efbc00806120300x2dce3200w9588d90336aa77e7@mail.gmail.com References: fa4efbc00806120300x2dce3200w9588d90336aa77e7@mail.gmail.com Message-ID: 92ab989c0806120729l50014414o1e32eefd08048ee0@mail.gmail.com

On Thu, Jun 12, 2008 at 7:00 AM, Yuri Takhteyev yuri@sims.berkeley.edu wrote:

Now that kepler 1.1 is out, I made a set of Sputnik rocks to go with it. This is based on the recent "Earth" code, with all the changes that Jim and I did in spring. This is a first stab at a release and might have some minor quirks, but this should actually work better than the last release ("Dish of the Day").

Nice job! Good to see that Kepler 1.1 has already one use. :o)

What would you recommend concerning keplerproject.org's migration to Earth? I'd wait for a final Earth release, but what about the current wiki data itself?

Andr?

From yuri at sims.berkeley.edu Thu Jun 12 16:46:45 2008 From: yuri at sims.berkeley.edu (Yuri Takhteyev) Date: Thu Jun 12 16:55:28 2008 Subject: [Sputnik-list] sputnik earth on kepler 1.1 In-Reply-To: fa4efbc00806121126i25d49cd2y94d278e8da356ca7@mail.gmail.com References: fa4efbc00806120300x2dce3200w9588d90336aa77e7@mail.gmail.com

<92ab989c0806120729l50014414o1e32eefd08048ee0@mail.gmail.com>
<fa4efbc00806121126i25d49cd2y94d278e8da356ca7@mail.gmail.com>

Message-ID: fa4efbc00806121146v42e94a5br5db3c26b02b3406b@mail.gmail.com

What would you recommend concerning keplerproject.org's migration to Earth? I'd wait for a final Earth release, but what about the current wiki data itself?

The data format is the same for all 2008 releases. In fact, you should be able to upgrade between future versions of Sputnik with just luarocks commands. Earth does change the format of the _passwords node, so you will need to flush the old users or convert the file.

As for timing of migration, it really depends on how much you want the new features. From the user point of view, the main new features are:

  • New authentication options (which I described in the original email)
  • Some protection again XSS attacks
  • A richer permission system
  • Simpler non-admin edit forms for non-admins
  • Stricter security by default. (E.g., non-admin users cannot even see hashes of passwords now.)

The more important changes, however, are the ones facing developers / power users:

  • Using Kepler 1.1.
  • Easier to add custom storage backends
  • Easier to add your custom authentication system
  • Overall cleaner and more extensible

We also have four additional storage backends in the works: sqlite3, mysql, svn and git. At least the first two should be out soon, but not yet.

  • yuri

-- http://sputnik.freewisdom.org/

From carregal at fabricadigital.com.br Thu Jun 12 17:28:56 2008 From: carregal at fabricadigital.com.br (Andre Carregal) Date: Thu Jun 12 17:37:10 2008 Subject: [Sputnik-list] sputnik earth on kepler 1.1 In-Reply-To: fa4efbc00806121146v42e94a5br5db3c26b02b3406b@mail.gmail.com References: fa4efbc00806120300x2dce3200w9588d90336aa77e7@mail.gmail.com

<92ab989c0806120729l50014414o1e32eefd08048ee0@mail.gmail.com>
<fa4efbc00806121126i25d49cd2y94d278e8da356ca7@mail.gmail.com>
<fa4efbc00806121146v42e94a5br5db3c26b02b3406b@mail.gmail.com>

Message-ID: 92ab989c0806121228h333c9f04g366567f3c1a427b0@mail.gmail.com

On Thu, Jun 12, 2008 at 3:46 PM, Yuri Takhteyev yuri@sims.berkeley.edu wrote:

The data format is the same for all 2008 releases. In fact, you should be able to upgrade between future versions of Sputnik with just luarocks commands. Earth does change the format of the _passwords node, so you will need to flush the old users or convert the file.

But what if the current version (as ours) does not use LuaRocks yet? Or were you talking about post Earth upgrades?

Andr?

From yuri at sims.berkeley.edu Thu Jun 12 19:41:44 2008 From: yuri at sims.berkeley.edu (Yuri Takhteyev) Date: Thu Jun 12 19:50:01 2008 Subject: [Sputnik-list] sputnik earth on kepler 1.1 In-Reply-To: 92ab989c0806121228h333c9f04g366567f3c1a427b0@mail.gmail.com References: fa4efbc00806120300x2dce3200w9588d90336aa77e7@mail.gmail.com

<92ab989c0806120729l50014414o1e32eefd08048ee0@mail.gmail.com>
<fa4efbc00806121126i25d49cd2y94d278e8da356ca7@mail.gmail.com>
<fa4efbc00806121146v42e94a5br5db3c26b02b3406b@mail.gmail.com>
<92ab989c0806121228h333c9f04g366567f3c1a427b0@mail.gmail.com>

Message-ID: fa4efbc00806121441ubef81c5tc8439c63463e6900@mail.gmail.com

But what if the current version (as ours) does not use LuaRocks yet? Or were you talking about post Earth upgrades?

I believe keplerproject.org is running "Dish of the Day" (~ early 2008), which does use LuaRocks. It installs 2007.12.17 snapshot of Kepler, then installs Luarocks 0.4.2, then installs Sputnik as a collection of rocks. It doesn't rely on luarocks to install actual Kepler components, though. I assume that one probably could take that installation of Kepler and just update all the rocks (both Kepler's and Sputnik's), but I wouldn't recommend this. Better start with a fresh install of Kepler 1.1 to make sure that everyone is on the same page. So, yes, I did mean different "Earth" releases, and possibly later. Basically, as long as Kepler doesn't change, one should be able to upgrade Sputnik with just LuaRocks. Come Kepler 1.2, this can all change of course.

For the sake of completeness, LuaRocks.org I believe is running an earlier version (from October or November), which does not include LuaRocks at all.

BTW, I am trying to keep track of different Sputnik installations on http://sputnik.freewisdom.org/en/Sightings. If yours is on this list and you end up upgrading, please update the page.

  • yuri

-- http://sputnik.freewisdom.org/