Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

How do i deploy streisand on local server, instead of deploying it on the cloud? #122

Closed
fnlctrl opened this issue Jan 31, 2015 · 11 comments

Comments

@fnlctrl
Copy link

fnlctrl commented Jan 31, 2015

as the title says

@fnlctrl fnlctrl changed the title deploying on a linode server, says 'pycurl required for this module' sorry...please delete this, i mis-clicked. Jan 31, 2015
@fnlctrl fnlctrl closed this as completed Jan 31, 2015
@fnlctrl fnlctrl changed the title sorry...please delete this, i mis-clicked. how do i deploy streisand on local server, instead of deploying it on the cloud? Jan 31, 2015
@fnlctrl fnlctrl changed the title how do i deploy streisand on local server, instead of deploying it on the cloud? How do i deploy streisand on local server, instead of deploying it on the cloud? Jan 31, 2015
@fnlctrl fnlctrl reopened this Jan 31, 2015
@zjx20
Copy link
Contributor

zjx20 commented Feb 28, 2015

+1

@skeeve42
Copy link
Contributor

skeeve42 commented Mar 4, 2015

This isn't currently possible, though @jlund has mentioned including this functionality at some point in #93 in a Dec. 18 post.

@skeeve42
Copy link
Contributor

skeeve42 commented Jun 1, 2015

Any update on this? It would really make things simpler for me to help others get streisand going who only have access to windows machines and the server they're putting it on.

@soyuka
Copy link

soyuka commented Jun 1, 2015

uncomment this and set it to your server ip address, I remember that I used localhost once but docs had bad links.

Add this:

host_key_checking = False // line in the ansible.cfg file. That setting

to the ansible.cfg file.

Launch the ansible playbook directly:

ansible-playbook playbooks/streisand.yml

@skeeve42 I don't know why it would not be possible, I managed to do it twice. But, I remember having small issues and that I might have removed a line or two from the playbook.

@skeeve42
Copy link
Contributor

skeeve42 commented Jun 2, 2015

@soyuka Thanks I'll give it a try!

@skeeve42
Copy link
Contributor

skeeve42 commented Jul 8, 2015

@soyuka I finally got around to trying this, but it gave me an immediate error. (data could not be sent to the remote host). Ah well, I'll just install it via another VPS again. Silly, but all I can do!

@nickolasclarke
Copy link
Collaborator

@skeeve42 I too have been able to get this to work on a local machine, and it did require the modifications that @soyuka suggested. I'll try to dig up which line items I had to monkey with to make it work, but I got it running within a few hours.

@ghost
Copy link

ghost commented Oct 28, 2015

you could try adding localhost to inventory and run ansible-playbook with --connection=local option

ansible-playbook playbooks/streisand.yml --connection=local

@ma-tt
Copy link

ma-tt commented Apr 10, 2017

+1

@cpu
Copy link
Collaborator

cpu commented Apr 10, 2017

Hi @ma-tt, please avoid +1 comments since they create notifications unneccesarily. Can you use a Github reaction emoji 👍 on the issue itself in the future? Thanks!

alimakki added a commit to alimakki/streisand that referenced this issue Apr 29, 2017
# This is the 1st commit message:
initial fr commit

# This is the commit message StreisandEffect#2:

readme completed

# This is the commit message StreisandEffect#3:

corrections

# This is the commit message StreisandEffect#4:

readme done

# This is the commit message StreisandEffect#5:

readme even more done

# This is the commit message StreisandEffect#6:

more corrections

# This is the commit message StreisandEffect#7:

initial commit for translated instructions

# This is the commit message StreisandEffect#8:

fixed typos

# This is the commit message StreisandEffect#9:

fixed markdown

# This is the commit message StreisandEffect#10:

fixed anchor

# This is the commit message StreisandEffect#11:

grammar and typos

# This is the commit message StreisandEffect#12:

fixed markdown

# This is the commit message StreisandEffect#13:

finished french instructions for windows l2tp/ipsec

# This is the commit message StreisandEffect#14:

androïde

# This is the commit message StreisandEffect#15:

finished osx instructions for l2tp/ipsec

# This is the commit message StreisandEffect#16:

finished linux l2tp/ipsec

# This is the commit message StreisandEffect#17:

finished ios l2tp/ipsec

# This is the commit message StreisandEffect#18:

common entries in l2tp translated

# This is the commit message StreisandEffect#19:

minor corrections

# This is the commit message StreisandEffect#20:

android l2tp/ipsec translations done

# This is the commit message StreisandEffect#21:

l2tp/ipsec french done

# This is the commit message StreisandEffect#22:

typos

# This is the commit message StreisandEffect#23:

initial commit for openconnect

# This is the commit message StreisandEffect#24:

partial windows instructions completed

# This is the commit message StreisandEffect#25:

removed idea files

# This is the commit message StreisandEffect#26:

renamed readme_fr to readme-fr

# This is the commit message StreisandEffect#27:

windows oc instructions done

# This is the commit message StreisandEffect#28:

finished osx instructions, updated brew url to https

# This is the commit message StreisandEffect#29:

oc linux instructions done, minor corrections

# This is the commit message StreisandEffect#30:

stuff

# This is the commit message StreisandEffect#31:

oc instructions french done

# This is the commit message StreisandEffect#32:

minor correction

# This is the commit message StreisandEffect#33:

initial commit for openvpn instructions fr

# This is the commit message StreisandEffect#34:

finished windows ovpn instructions

# This is the commit message StreisandEffect#35:

copypasta the common stuff

# This is the commit message StreisandEffect#36:

typos

# This is the commit message StreisandEffect#37:

removed azure from upcoming features fr

# This is the commit message StreisandEffect#38:

updated azure Readme-fr.md

# This is the commit message StreisandEffect#39:

Silence la censure. Automatiser l'effet

# This is the commit message StreisandEffect#40:

minor corrections

# This is the commit message StreisandEffect#41:

minor corrections

# This is the commit message StreisandEffect#42:

more translations

# This is the commit message StreisandEffect#43:

finished macos ovpn instructions

# This is the commit message StreisandEffect#44:

eeeeeeeeee

# This is the commit message StreisandEffect#45:

openvpn linux cli done

# This is the commit message StreisandEffect#46:

finish linux ovpn network manager

# This is the commit message StreisandEffect#47:

ovpn android done

# This is the commit message StreisandEffect#48:

finished ovpn ios instructions

# This is the commit message StreisandEffect#49:

minor correction

# This is the commit message StreisandEffect#50:

initial commit for shadowsocks-fr

# This is the commit message StreisandEffect#51:

windows shadowsocks done

# This is the commit message StreisandEffect#52:

shadowsocks macos done

# This is the commit message StreisandEffect#53:

really macos is done

# This is the commit message StreisandEffect#54:

commit before merge

# This is the commit message StreisandEffect#55:

finished ff shadowsocks instructions

# This is the commit message StreisandEffect#56:

shadowsocks done

# This is the commit message StreisandEffect#57:

initial commit for wg fr

# This is the commit message StreisandEffect#58:

initial commit for ssh fr

# This is the commit message StreisandEffect#59:

windows ssh instructions done

# This is the commit message StreisandEffect#60:

linux-osx ssh done

# This is the commit message StreisandEffect#61:

linux osx alternative ssh done

# This is the commit message StreisandEffect#62:

android almost done

# This is the commit message StreisandEffect#63:

finished instructions for shadowsocks

# This is the commit message StreisandEffect#64:

mirror index fr done

# This is the commit message StreisandEffect#65:

tunnel ssh

# This is the commit message StreisandEffect#66:

progress for streisang-gateway fr

# This is the commit message StreisandEffect#67:

finished windows gateway instructions

# This is the commit message StreisandEffect#68:

manual ssl verification done

# This is the commit message StreisandEffect#69:

one more line

# This is the commit message StreisandEffect#70:

finished osx android gateway fr

# This is the commit message StreisandEffect#71:

ios gateway done

# This is the commit message StreisandEffect#72:

finished all of gateway instructions fr

# This is the commit message StreisandEffect#73:

initial commit for tor-fr

# This is the commit message StreisandEffect#74:

tor done

# This is the commit message StreisandEffect#75:

initial commit for azure-fr.md

# This is the commit message StreisandEffect#76:

azure-fr done

# This is the commit message StreisandEffect#77:

preparing to link it all up

# This is the commit message StreisandEffect#78:

working on i18n generation

# This is the commit message StreisandEffect#79:

Streisand CI Testing

# This is the commit message StreisandEffect#80:

attempt i18n..

# This is the commit message StreisandEffect#81:

removed commented stuff

# This is the commit message StreisandEffect#82:

fixed lang loop in md templates

# This is the commit message StreisandEffect#83:

spelling

# This is the commit message StreisandEffect#84:

regex_replace

# This is the commit message StreisandEffect#85:

regex_replace

# This is the commit message StreisandEffect#86:

langauge_name

# This is the commit message StreisandEffect#87:

item in loop

# This is the commit message StreisandEffect#88:

trying iteritems

# This is the commit message StreisandEffect#89:

ocserv i18n

# This is the commit message StreisandEffect#90:

openvpn i18n

# This is the commit message StreisandEffect#91:

fixed stunnel status

# This is the commit message StreisandEffect#92:

updated shadowsocks instructions

# This is the commit message StreisandEffect#93:

shadowsocks i18n

# This is the commit message StreisandEffect#94:

finished ssh i18n

# This is the commit message StreisandEffect#95:

finished gateway i18n

# This is the commit message StreisandEffect#96:

adding index and firewall fr

# This is the commit message StreisandEffect#97:

finished tor i18n, adding .html to templates

# This is the commit message StreisandEffect#98:

finished wg i18n

# This is the commit message StreisandEffect#99:

wg with_dict not with_items

# This is the commit message StreisandEffect#100:

fixed streisand mirror index task

# This is the commit message StreisandEffect#101:

fixed shadowsocks mirror index fr

# This is the commit message #102:

streisand_markdown_mirror_page removed

# This is the commit message StreisandEffect#103:

streisand_ci = no

# This is the commit message StreisandEffect#104:

fixed tor gateway instructions

# This is the commit message StreisandEffect#105:

hopefully fixes all page generation issues

# This is the commit message StreisandEffect#106:

updated index-fr.html

# This is the commit message StreisandEffect#107:

l2tp oconnect should generate correctly now

# This is the commit message StreisandEffect#108:

fixed mirror links for i18n

# This is the commit message StreisandEffect#109:

finished remaining translation, mirror link fixes

# This is the commit message StreisandEffect#110:

fixed stunnel instructions

# This is the commit message StreisandEffect#111:

hopefully the last of the corrections

# This is the commit message StreisandEffect#112:

typos and grammatics

# This is the commit message StreisandEffect#113:

more corrections

# This is the commit message StreisandEffect#114:

mirroring french localized tor

# This is the commit message StreisandEffect#115:

minor corrections

# This is the commit message StreisandEffect#116:

clarifications

# This is the commit message StreisandEffect#117:

Somme de contrôle

# This is the commit message StreisandEffect#118:

s/potatso/cross

# This is the commit message StreisandEffect#119:

changed google links for fr to hl=fr

# This is the commit message StreisandEffect#120:

copypasta quirk

# This is the commit message StreisandEffect#121:

cleanup, removed shadowsocks OTA

# This is the commit message StreisandEffect#122:

removed shadowsocks from unattended upgrades

# This is the commit message StreisandEffect#123:

removed unecessary stuff from unattended upgrades

# This is the commit message StreisandEffect#124:

Streisand CI Testing

# This is the commit message StreisandEffect#125:

CI updates based on feedback

# This is the commit message StreisandEffect#126:

permissions

# This is the commit message StreisandEffect#127:

updated readme-fr

# This is the commit message StreisandEffect#128:

Update readme-fr

No need for brew update anymore

# This is the commit message StreisandEffect#129:

removed ci
cpu added a commit that referenced this issue Jun 9, 2017
This PR adds initial first-party support for "local provisioning",
that is, installing Streisand to the same machine that is running the
Ansible playbooks. This feature can be useful for individuals that can't
meet the Ansible system requirements on their client machine (e.g.
because it is Windows), or for users whose internet connection makes the
Ansible SSH connections unreliable.

The Streisand script is updated to pull distinct operations into bash
functions. A new test for the existence of the `~/.ssh/id_rsa.pub` SSH key
is added, since presently Streisand assumes it to exists and this is 
frequently a source of user error. 

To support local provisioning a new option is added to the initial
./streisand script menu. It is marked as an advanced feature and
requires that you enter a confirmation prompt to ensure you fully
understand that the Streisand playbooks will be overwriting configs on
the same machine that is running the script.

Similarly, an advanced option for running the Streisand playbook against
an existing server was added to the wrapper script. This allows testing the
SSH access for the root user (overidable with the `ANSIBLE_SSH_USER`
env var) before invoking the playbook, hopefully again helping to identify
user error early. The existing server option generates an inventory file on
the fly based on an IP the user enters and writes it to 
`inventories/inventory-existing`, avoiding the need to manually edit an
inventory file for existing servers & hopefully encouraging more people to
use the wrapper where we can detect common errors.

With several inventory files to `sed` patch for `python` vs `python2` and 
to avoid clutter this PR also moves the inventory files into a dedicated 
`inventories/` directory. The `ansible.cfg` file is updated to use 
`inventories/inventory` as the default inventory to maintain backwards
compatibility.

To help keep a growing pile of bash manageable `shellcheck` is added
to CI builds and run against the `streisand` wrapper.

For localhost installs the `streisand_ip4_address` var is set to
the Ansible default IPv4 address, which itself is calculated based on
the default IPv4 route to 8.8.8.8. This works for _most_ systems but
will likely fail for some more esoteric providers.

For the more complicated cases (e.g. GCE) a common 
`playbooks/provider-detect.yml` attempts to determine if the instance 
belongs to a known cloud provider (currently only GCE & AWS are 
supported) and will update the external IPv4 address according to the instance
metadata since it is not available as a property of any of the interfaces
on the server.

Resolves #595, #468, #122
@cpu
Copy link
Collaborator

cpu commented Jun 16, 2017

This has been officially supported since #724 was merged. The answer to the original thread topic is now:

  1. Clone master on the server
  2. Follow the setup instructions (installing python, pip, ansible)
  3. Running ./streisand
  4. Choosing the local server install.

Closing this issue. Thanks everyone.

@cpu cpu closed this as completed Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants