Wrote 08-Deply First app, and 06 WSL2 Linux ssh
This commit is contained in:
parent
83f0e9b688
commit
f779ce0a20
|
@ -1,8 +1,46 @@
|
|||
# Use WSL Linux SSH to login to remote Capsule
|
||||
Previously, we logged into the remote capsule using ssh in a Windows cmd.exe window. Before we can continue, we need to make sure that the Linux distribution inside WSL2 can also login to the remote Capsul using ssh.
|
||||
|
||||
1. Create the .ssh subdirectory in your home directory:
|
||||
|
||||
> mkdir ~/.ssh
|
||||
|
||||
1. Change working directory to the .ssh subdirectory
|
||||
|
||||
> cd ~/.ssh
|
||||
|
||||
1. Copy your keys from your Windows .ssh directory into the Linux .ssh directory using the cp command and the Windows C: drive being mounted at /mnt/c. Assuming your Windows user name is *user*. Verify that both parts of your key have been copied into the Linux ~/.ssh folder with the *ls* command.
|
||||
|
||||
> cp /mnt/c/users/user/.ssh/id_rsa* .
|
||||
|
||||
You should see two files, id_rsa and id_rsa.pub
|
||||
|
||||
1. Change the permissions of the id_rsa file so that only you have read and write rights on it, using the *chmod* command.
|
||||
|
||||
> chmod 700 id_rsa
|
||||
|
||||
1. Use the ssh command to connect to your Capsul's ip address.
|
||||
|
||||
> ssh user@capsul-ip-address
|
||||
|
||||
1. When you try the ssh command, it will say the authenticity of the host can't be established. Copy the fingerprint from the Linux command window to the clipboard.
|
||||
|
||||
![run ssh and copy key fingerprint to clipboard](01.png "run ssh and copy key fingerprint to clipboard")
|
||||
|
||||
1. Open your Capsul fingerprints file in Notepad. Compare the fingerprint from the Linux command line *ssh* to the fingerprint in Notepad.
|
||||
![open fingerprints in notepad and match](02.png "open fingerprints in notepad and match")
|
||||
|
||||
1. If the fingerprints match, type yes and press enter.
|
||||
![enter 'yes' if fingerprints match](03.png "enter 'yes' if fingerprints match")
|
||||
|
||||
![run ssh again using domain name instead of ip address](05.png "run ssh again using domain name instead of ip address")
|
||||
|
||||
1. Close the ssh connection to your Capsul's ip address.
|
||||
1. Open a ssh connection to your Capsul's domain name.
|
||||
|
||||
> ssh user@capsul-domain-name
|
||||
|
||||
1. Again, compare the fingerprint of the ssh command with the fingerprint in the capsul-fingerprints file. If they match, type *yes* and Enter. This causes the domain name to be added to the list of known hosts.
|
||||
|
||||
1. Close the ssh connection to your remote capsule.
|
||||
|
||||
1. Now that you've confirmed your WSL2 Linux system can login to your remote Capsul, proceed with the next steps.
|
Binary file not shown.
After Width: | Height: | Size: 87 KiB |
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
|
@ -1,21 +1,41 @@
|
|||
![01](01.png "01")
|
||||
# Deploy First App to Capsul
|
||||
|
||||
![02](02.png "02")
|
||||
Currently, the official catalogue of Coop-Cloud apps is at [App catalogue]( https://docs.coopcloud.tech/apps/). There's an experimental version of the catalogue in the works; you can see the link to it in the image.
|
||||
|
||||
![03](03.png "03")
|
||||
![00](00.png "00")
|
||||
|
||||
We'll be deploying Custom HTML by following the instructions in "Basic usage" below.
|
||||
![01](0.1.png "0.1")
|
||||
|
||||
1. Let's create a minimal HTML5 web page. Launch your WSL Linux system. Create a file called index.html. The example below uses the nano text editor.
|
||||
![04](04.png "04")
|
||||
|
||||
1. Assuming you have previously copied basic HTML5 code into the clipboard, you can right-click the top of the Linux command window, slide down to Edit, slide over to Paste and click on it.
|
||||
![05](05.png "05")
|
||||
|
||||
This is what nano looks like after pasting a minimal HTML5 document into it. Use Ctrl-O to save the file, and Ctrl-X to exit the nano editor.
|
||||
![06](06.png "06")
|
||||
|
||||
1. Create the custom html app on your Capsul using Abra. The app is associated with the server named *coolstuff.ninja*. It will be listening at the domain name *coolstuff.ninja*, that is, after it is deployed, when you type https://coolstuff.ninja, you will see the minimal html5 page we've just saved in index.html. The --app-name option tells Abra to name the app *custom-html-ninj*.
|
||||
|
||||
> abra app new custom-html --server coolstuff.ninja --domain coolstuff.ninja --app-name custom-html-ninj
|
||||
|
||||
![07](07.png "07")
|
||||
|
||||
![08](08.png "08")
|
||||
1. After abra finishes adding the new app, you can check out its configuration:
|
||||
> abra app custom-html-ninj config
|
||||
|
||||
![08](08.png "08")
|
||||
This opens custom-html-ninj's configuration in a text editor, and you could update any values which need to be updated. In this case, everything looks good, so we don't make any changes.
|
||||
![09](09.png "09")
|
||||
|
||||
1. It's time to deploy the app. It's a very basic app, and so the command line to deploy it is very simple. Type 'y' to confirm the deployment. After a few moments, you should see *SUCCESS: Yay! App should be available at **domain-name***.
|
||||
You need to copy the index.html file into the custom-html-ninj app.
|
||||
|
||||
> abra app custom-html-ninj cp index.html app:/usr/share/nginx/html
|
||||
|
||||
![10](10.png "10")
|
||||
|
||||
1. Finally, open your website using your browser. https://your-domain-name
|
||||
|
||||
![11](11.png "11")
|
||||
|
||||
You should see "This is the Title" in the page's title, and "This is the page content." on the page.
|
Loading…
Reference in New Issue