Skip to content

Commit

Permalink
Merge pull request #216 from Raphux/master
Browse files Browse the repository at this point in the history
Move directory from "script_utils" to "tools"
  • Loading branch information
Raphux committed Nov 3, 2017
2 parents da08e4a + ad608b1 commit a370ae9
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 48 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN mkdir /etc/passhport && \
cp /home/passhport/passhport/passhport/passhport.ini /etc/passhport/. && \
sed -e 's/^LISTENING_IP =.*/LISTENING_IP = 0.0.0.0/' /home/passhport/passhport/passhportd/passhportd.ini > /etc/passhport/passhportd.ini && \
cp /home/passhport/passhport/passhport_admin/passhport-admin.ini /etc/passhport/.
ENTRYPOINT ["/home/passhport/passhport/scripts_utils/docker_switch.sh", "/home/passhport/passhport-run-env/bin/python"]
ENTRYPOINT ["/home/passhport/passhport/tools/docker_switch.sh", "/home/passhport/passhport-run-env/bin/python"]

EXPOSE 5000
EXPOSE 22
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ The followings shows you how to install and run PaSSHport on Debian 8 (Jessie) o

The easy, automated way
-----------------------
You can review the installation script `here <https://raw.githubusercontent.com/Raphux/passhport/master/scripts_utils/passhport-install-script-debian-8-9.sh>`__.
You can review the installation script `here <https://raw.githubusercontent.com/Raphux/passhport/master/tools/passhport-install-script-debian-8-9.sh>`__.

You can run it directly from command line ( please ensure that curl is installed : ``apt install curl`` ):

.. code-block:: none
root@debian9:~# bash <(curl -s https://raw.githubusercontent.com/Raphux/passhport/master/scripts_utils/passhport-install-script-debian-8-9.sh)
root@debian9:~# bash <(curl -s https://raw.githubusercontent.com/Raphux/passhport/master/tools/passhport-install-script-debian-8-9.sh)
Once finished, you can go to the `Getting Started <getting-started.html>`_ chapter.

Expand Down Expand Up @@ -215,7 +215,7 @@ Create the RSA key :
There is a conf file provided for OpenSSL, to generate a minimal correct SSL cert. The file is :

``/home/passhport/passhport/scripts_utils/openssl-for-passhportd.cnf``
``/home/passhport/passhport/tools/openssl-for-passhportd.cnf``

Edit it, and add DNS name you’ll use to reach the API. For the tutorial, we’ll use two hostnames :

Expand Down Expand Up @@ -246,7 +246,7 @@ Now, generate the certificate using this command (put on multiple lines, so you
.. code-block:: none
openssl req -new -key "/home/passhport/certs/key.pem" \
-config "/home/passhport/passhport/scripts_utils/openssl-for-passhportd.cnf" \
-config "/home/passhport/passhport/tools/openssl-for-passhportd.cnf" \
-out "/home/passhport/certs/cert.pem" \
-subj "/C=FR/ST=Ile De France/L=Ivry sur Seine/O=LibrIT/OU=DSI/CN=passhport.librit.fr" \
-x509 -days 365 -sha256 \
Expand Down
59 changes: 32 additions & 27 deletions docs/po/fr/LC_MESSAGES/getting-started.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PaSSHport 1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-01 03:37+0100\n"
"POT-Creation-Date: 2017-11-03 17:23+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -35,113 +35,118 @@ msgstr ""
msgid "For this tutorial, we will use the following infos :"
msgstr ""

#: ../../getting-started.rst:11
#: ../../getting-started.rst:13
msgid "1 PaSSHport node"
msgstr ""

#: ../../getting-started.rst:12
#: ../../getting-started.rst:14
msgid ""
"We'll use a monolithic installation of PaSSHport : passhportd, passhport "
"and passhport-admin are on the same host."
msgstr ""

#: ../../getting-started.rst:15
#: ../../getting-started.rst:17
msgid "3 users"
msgstr ""

#: ../../getting-started.rst:16
#: ../../getting-started.rst:18
msgid ""
"John, a linux/unix administrator, who needs to access all linux/unix "
"servers"
msgstr ""

#: ../../getting-started.rst:17
#: ../../getting-started.rst:19
msgid ""
"Vincent, a network administrator, who needs to access all network "
"appliances"
msgstr ""

#: ../../getting-started.rst:18
#: ../../getting-started.rst:20
msgid ""
"Alice, a general appliance administrator who needs to access all tier "
"appliances"
msgstr ""

#: ../../getting-started.rst:19
#: ../../getting-started.rst:21
msgid ""
"Yann, a consultant who's here for a temporary mission about storage "
"infrastructure, that need to access the NAS server and a the SAN bay"
msgstr ""

#: ../../getting-started.rst:22
#: ../../getting-started.rst:24
msgid "1 PaSSHport admin"
msgstr ""

#: ../../getting-started.rst:23
#: ../../getting-started.rst:25
msgid "Marc, the ISSM, who configures PaSSHport, to control all the access rights"
msgstr ""

#: ../../getting-started.rst:26
#: ../../getting-started.rst:28
msgid "3 types of targets"
msgstr ""

#: ../../getting-started.rst:27
#: ../../getting-started.rst:29
msgid "Linux/Unix servers :"
msgstr ""

#: ../../getting-started.rst:28
#: ../../getting-started.rst:31
msgid "1 web server, Linux, www-server / 10.0.1.24"
msgstr ""

#: ../../getting-started.rst:29
#: ../../getting-started.rst:32
msgid "1 VPN server, OpenBSD, vpn-srv1 / 10.0.23.51"
msgstr ""

#: ../../getting-started.rst:30
#: ../../getting-started.rst:33
msgid "1 NAS server, FreeBSD, nas-srv1 / 10.0.12.87"
msgstr ""

#: ../../getting-started.rst:31
#: ../../getting-started.rst:35
msgid "Network appliances"
msgstr ""

#: ../../getting-started.rst:32
#: ../../getting-started.rst:37
msgid "1 WiFi access points, net-AP9-23 / 172.22.9.23"
msgstr ""

#: ../../getting-started.rst:33
#: ../../getting-started.rst:38
msgid "1 router, net-RO10-98 / 172.16.10.98"
msgstr ""

#: ../../getting-started.rst:34
#: ../../getting-started.rst:39
msgid "1 network switch, net-SW22-57 / 172.20.22.57"
msgstr ""

#: ../../getting-started.rst:35
#: ../../getting-started.rst:41
msgid "Other appliances"
msgstr ""

#: ../../getting-started.rst:36
#: ../../getting-started.rst:43
msgid "1 IPBX, ipbx1 / 10.192.98.76"
msgstr ""

#: ../../getting-started.rst:37
#: ../../getting-started.rst:44
msgid "1 Network printer, prntr44 / 192.168.254.44"
msgstr ""

#: ../../getting-started.rst:38
#: ../../getting-started.rst:45
msgid "1 SAN bay, san1 / 10.192.1.10"
msgstr ""

#: ../../getting-started.rst:41
#: ../../getting-started.rst:48
msgid "Configure targets"
msgstr ""

#: ../../getting-started.rst:42
#: ../../getting-started.rst:49
msgid "First of all, we'll include the targets into PaSSHport."
msgstr ""

#: ../../getting-started.rst:44
msgid "Let's connect to your PaSSHport node, and add the linux target :"
#: ../../getting-started.rst:51
msgid ""
"Let's connect to your PaSSHport node, and add the linux target, you can "
"do this as passhport :"
msgstr ""

#~ msgid "Let's connect to your PaSSHport node, and add the linux target :"
#~ msgstr ""

6 changes: 3 additions & 3 deletions docs/po/fr/LC_MESSAGES/installation-and-configuration.po
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ msgstr ""
#~ msgid ""
#~ "You can review the installation script"
#~ " `here "
#~ "<https://raw.githubusercontent.com/Raphux/passhport/master/scripts_utils"
#~ "<https://raw.githubusercontent.com/Raphux/passhport/master/tools"
#~ "/passhport-install-script-debian-8-9.sh>`__."
#~ msgstr ""
#~ "Le script d'installation est disponible "
#~ "pour relecture `ici "
#~ "<https://raw.githubusercontent.com/Raphux/passhport/master/scripts_utils"
#~ "<https://raw.githubusercontent.com/Raphux/passhport/master/tools"
#~ "/passhport-install-script-debian-8-9.sh>`__."

#~ msgid ""
Expand Down Expand Up @@ -282,7 +282,7 @@ msgstr ""
#~ "certificat minimal SSL correcte. Le "
#~ "fichier est :"

#~ msgid "``/home/passhport/passhport/scripts_utils/openssl-for-passhportd.cnf``"
#~ msgid "``/home/passhport/passhport/tools/openssl-for-passhportd.cnf``"
#~ msgstr ""

#~ msgid ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ msgstr ""
#: ../../installation-and-configuration/installation-on-debian.rst:11
msgid ""
"You can review the installation script `here "
"<https://raw.githubusercontent.com/Raphux/passhport/master/scripts_utils"
"<https://raw.githubusercontent.com/Raphux/passhport/master/tools"
"/passhport-install-script-debian-8-9.sh>`__."
msgstr ""

Expand Down Expand Up @@ -193,7 +193,7 @@ msgid ""
msgstr ""

#: ../../installation-and-configuration/installation-on-debian.rst:218
msgid "``/home/passhport/passhport/scripts_utils/openssl-for-passhportd.cnf``"
msgid "``/home/passhport/passhport/tools/openssl-for-passhportd.cnf``"
msgstr ""

#: ../../installation-and-configuration/installation-on-debian.rst:220
Expand Down
4 changes: 2 additions & 2 deletions docs/po/fr/LC_MESSAGES/installation-on-debian.po
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ msgstr ""
#: ../../installation-on-debian.rst:11
msgid ""
"You can review the installation script `here "
"<https://raw.githubusercontent.com/Raphux/passhport/master/scripts_utils"
"<https://raw.githubusercontent.com/Raphux/passhport/master/tools"
"/passhport-install-script-debian-8-9.sh>`__."
msgstr ""

Expand Down Expand Up @@ -193,7 +193,7 @@ msgid ""
msgstr ""

#: ../../installation-on-debian.rst:218
msgid "``/home/passhport/passhport/scripts_utils/openssl-for-passhportd.cnf``"
msgid "``/home/passhport/passhport/tools/openssl-for-passhportd.cnf``"
msgstr ""

#: ../../installation-on-debian.rst:220
Expand Down
4 changes: 2 additions & 2 deletions scripts_utils/docker_switch.sh → tools/docker_switch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ shift
ARGS_LIST=$@
case "${DOCKER_PASSHPORT_SWITCH}" in
passhportd)
su - passhport -c "/home/passhport/passhport/scripts_utils/launch_passhportd_docker.sh ${PYTHON_ENV}"
su - passhport -c "/home/passhport/passhport/tools/launch_passhportd_docker.sh ${PYTHON_ENV}"
;;
passhport-admin)
su - passhport -c "/home/passhport/passhport/scripts_utils/launch_passhport-admin_docker.sh ${PYTHON_ENV} ${ARGS_LIST}"
su - passhport -c "/home/passhport/passhport/tools/launch_passhport-admin_docker.sh ${PYTHON_ENV} ${ARGS_LIST}"
;;
*)
echo "Oups ! Launch the correct mode between \"passhportd\" or \"passhport-admin\" when you launch the docker."
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ then
fi
done
IP_GATEWAY=`/sbin/ip route|awk '/default/ { print $3 }'`
echo "DNS.3 = ${IP_GATEWAY}" >> "/home/passhport/passhport/scripts_utils/openssl-for-passhportd.cnf"
echo "DNS.4 = ${PASSHPORTD_HOSTNAME}" >> "/home/passhport/passhport/scripts_utils/openssl-for-passhportd.cnf"
echo "DNS.3 = ${IP_GATEWAY}" >> "/home/passhport/passhport/tools/openssl-for-passhportd.cnf"
echo "DNS.4 = ${PASSHPORTD_HOSTNAME}" >> "/home/passhport/passhport/tools/openssl-for-passhportd.cnf"
su - passhport -c "openssl req -new -key \"/home/passhport/certs/key.pem\" \
-config \"/home/passhport/passhport/scripts_utils/openssl-for-passhportd.cnf\" \
-config \"/home/passhport/passhport/tools/openssl-for-passhportd.cnf\" \
-out \"/home/passhport/certs/cert.pem\" \
-subj '/C=FR/ST=Ile De France/L=Ivry sur Seine/O=LibrIT/OU=DSI/CN=${PASSHPORTD_HOSTNAME}' \
-x509 -days 365 -sha256\
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ su - passhport -c "/home/passhport/passhport-run-env/bin/python /home/passhport/
echo '##############################################################'
echo '# Creating symbolink links to binaries…'
echo '##############################################################'
ln -s /home/passhport/passhport/scripts_utils/passhport-admin_v0.sh /usr/bin/passhport-admin
ln -s /home/passhport/passhport/scripts_utils/launch_passhportd_v0.sh /usr/sbin/passhportd
ln -s /home/passhport/passhport/tools/passhport-admin_v0.sh /usr/bin/passhport-admin
ln -s /home/passhport/passhport/tools/launch_passhportd_v0.sh /usr/sbin/passhportd
echo '##############################################################'
echo '# Creating Web-API cert directory…'
echo '##############################################################'
Expand All @@ -130,12 +130,12 @@ su - passhport -c "openssl genrsa -out "/home/passhport/certs/key.pem" 4096"
echo '##############################################################'
echo '# Adding choosen IP to the certificate…'
echo '##############################################################'
sed -i -e "s#^\(DNS.*\s*=\s*\)TO_CHANGE#\1`hostname -f`#g" /home/passhport/passhport/scripts_utils/openssl-for-passhportd.cnf
sed -i -e "s#^\(DNS.*\s*=\s*\)TO_CHANGE#\1`hostname -f`#g" /home/passhport/passhport/tools/openssl-for-passhportd.cnf
echo '##############################################################'
echo '# Generating Web-API certificate…'
echo '##############################################################'
openssl req -new -key "/home/passhport/certs/key.pem" \
-config "/home/passhport/passhport/scripts_utils/openssl-for-passhportd.cnf" \
-config "/home/passhport/passhport/tools/openssl-for-passhportd.cnf" \
-out "/home/passhport/certs/cert.pem" \
-subj "/C=FR/ST=Ile De France/L=Ivry sur Seine/O=LibrIT/OU=DSI/CN=passhport.librit.fr" \
-x509 \
Expand Down

0 comments on commit a370ae9

Please sign in to comment.