eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.47k stars 315 forks source link

More deployment options #80

Open patrickbeeson opened 10 years ago

patrickbeeson commented 10 years ago

While I love what y'all have done for deploying to S3, it'd be great to have more options for deployment. These could be set via the config.

krallin commented 10 years ago

Hey there,

In Cactus v3, we support S3, Rackspace Cloud Files (which could probably support Swift in general pretty easily), and Google Cloud Storage.

Did you have something else in mind?

Cheers,

patrickbeeson commented 10 years ago

Cool, didn't realize that. I'd love to be able to deploy to WebFaction.

krallin commented 10 years ago

The interface in v3 is supposed to be pluggable, so you be able to add this as a deployment option.

Let me know how it goes / if you need help getting familiar with the architecture.

Cheers,

patrickbeeson commented 10 years ago

Great. I'll take a look. Thanks!

adamwintle commented 9 years ago

+1 for Github pages

stefanooldeman commented 9 years ago

dibs on Github pages. I'll be gladly looking into this and propose a pull request.

w4nderlust commented 9 years ago

What do you think about ading a simple ftp deployment? With just host, username, password and destination directory

krallin commented 9 years ago

@w4nderlust ,

This should be rather easy to write as a deployment engine. If you're interested in working on this, just let me know, and I'll provide some tips to get you started.

Cheers,

w4nderlust commented 9 years ago

Yes, give me some pointers and I'll try :)

krallin commented 9 years ago

@w4nderlust,

Basically, there are three things you need. I suggest you use the Rackspace examples here, they're probably the simplest:

https://github.com/koenbok/Cactus/blob/master/cactus/deployment/cloudfiles/

You need to:

Create a credentials manager. This basically is just an object that tells Cactus where and how to store Credentials. This is really trivial, yours should probably look like this:

class FTPCredentialsManager(BaseKeyringCredentialsManager):
    _username_config_entry = "ftp-username"
    _password_display_name = "FTP Password"
    _keyring_service = "cactus/ftp"

Next, create the deployment engine. This class should take care of all preparation work in the configure() method. In your case, this may be... nothing.

This should inherit from the BaseEngine defined here: https://github.com/koenbok/Cactus/blob/master/cactus/deployment/engine.py

The actual entrypoint called by Cactus is deploy(). This calls into the last thing you need to create, which is the file class. The file class is basically a class that should know how to deploy a given file. It should inherit from BaseFile.

There, you'll want to define do_upload and remote_changed (though the former can just return True unconditionally, but that wouldn't be ideal). Like the name implies, do_upload should upload your file.

You can pull in additional dependencies if needed. Just make sure you make them optional (look at the existing setup.py).

Let me know if you need further help,

Cheers,

ghost commented 9 years ago

@w4nderlust are you still working on a ftp deployment engine?

w4nderlust commented 9 years ago

I haven't started yet actually, I was thinking of doing it this week.

Il giorno 17/mag/2015, alle ore 21:27, pani-c notifications@github.com ha scritto:

@w4nderlust https://github.com/w4nderlust are you still working on a ftp deployment engine?

— Reply to this email directly or view it on GitHub https://github.com/koenbok/Cactus/issues/80#issuecomment-102838211.

ghost commented 9 years ago

Please leave a note if you're up to something ;-)

facconi commented 9 years ago

Hi everybody! Any news about a standard FTP deployment engine?

ghost commented 9 years ago

I was looking into pysftp but had trouble with its dependencies :(

syllog1sm commented 8 years ago

@krallin like this? https://github.com/syllog1sm/Cactus/commit/6e458b5f7ac838eadc5684cf0d8d6653a63f17a0

Doesn't complete any of the actual work yet. But the skeleton should be right, right?

Edit: It looks like there also needs to be CLI hooks for the deployment options? I can't figure out the entry point to these.

dwightgunning commented 8 years ago

For a straight local file system deployment, I have raise PR #171.

Ollie-w commented 8 years ago

How about Netlify? How would I deploy using that?