Difference between revisions of "RMU build Gen-1.5: II. Teleport - C. Share RMU Services Via Teleport"

From Internet Computer Wiki
Jump to: navigation, search
(Creating the page)
(Finishing page)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
This page is part of the [[RMU build Gen-1.5|Gen-1.5 RMU build runbook]].
 +
 +
Go back to the previous section: [[RMU build Gen-1.5: II. Teleport - B. Install Teleport Software|B. Install Teleport Software]]
 +
 +
== C. Share RMU Services Via Teleport ==
 
Ref: https://www.youtube.com/watch?v=cvW4b96aPL0
 
Ref: https://www.youtube.com/watch?v=cvW4b96aPL0
  
Line 22: Line 27:
 
#**[[File:Screenshot 2023-10-30 at 3.36.42 PM.png|alt=|800x800px]]
 
#**[[File:Screenshot 2023-10-30 at 3.36.42 PM.png|alt=|800x800px]]
 
# Save the ca_pin generated on the Teleport server:
 
# Save the ca_pin generated on the Teleport server:
#* <code>sudo vi /var/lib/teleport/ca_pin</code>
+
#*<code>sudo vi /var/lib/teleport/ca_pin</code>
           
+
#* [[File:Screenshot 2023-12-18 at 4.24.07 PM.png|800x800px]]
            ![Screenshot 2023-12-18 at 4.24.07 PM.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/3c759fcc-b170-476c-83a3-0afa17315dcd/f5cc3136-c5da-4e04-88bc-1c31614affcd/Screenshot_2023-12-18_at_4.24.07_PM.png)
 
           
 
 
# Edit the <code>/etc/teleport.yaml</code> to update the <code>ca_pin</code> resource:
 
# Edit the <code>/etc/teleport.yaml</code> to update the <code>ca_pin</code> resource:
 
#* <code>sudo vi /etc/teleport.yaml</code>
 
#* <code>sudo vi /etc/teleport.yaml</code>
Line 46: Line 49:
 
                     dc: "<dc>"
 
                     dc: "<dc>"
 
             </syntaxhighlight>
 
             </syntaxhighlight>
#* Sample <code>/etc/teleport.yaml</code> file:<syntaxhighlight>yaml
+
#* Sample <code>/etc/teleport.yaml</code> file: <syntaxhighlight lang="yaml">
        version: v3
+
version: v3
        teleport:
+
teleport:
          nodename: rmu
+
  nodename: rmu
          data_dir: /var/lib/teleport
+
  data_dir: /var/lib/teleport
          join_params:
+
  join_params:
            token_name: /var/lib/teleport/token
+
    token_name: /var/lib/teleport/token
            method: token
+
    method: token
          proxy_server: teleport.<dc>.<domain.name>:443
+
  proxy_server: teleport.<dc>.<domain.name>:443
          log:
+
  log:
            output: stderr
+
    output: stderr
            severity: INFO
+
    severity: INFO
            format:
+
    format:
              output: text
+
      output: text
          ca_pin: /var/lib/teleport/ca_pin
+
  ca_pin: /var/lib/teleport/ca_pin
          diag_addr: ""
+
  diag_addr: ""
        auth_service:
+
auth_service:
          enabled: "no"
+
  enabled: "no"
        ssh_service:
+
ssh_service:
          enabled: "yes"
+
  enabled: "yes"
          labels:
+
  labels:
            dc: "<dc>"
+
    dc: "<dc>"
            login: "root"
+
    login: "root"
        proxy_service:
+
proxy_service:
          enabled: "no"
+
  enabled: "no"
          https_keypairs: []
+
  https_keypairs: []
          https_keypairs_reload_interval: 0s
+
  https_keypairs_reload_interval: 0s
          acme: {}
+
  acme: {}
        app_service:
+
app_service:
          enabled: "yes"
+
  enabled: "yes"
          debug_app: false
+
  debug_app: false
          apps:
+
  apps:
          - name: <dc>-proxmox-webui
+
  - name: <dc>-proxmox-webui
              uri: https://localhost:8006
+
      uri: https://localhost:8006
              public_addr: ""
+
      public_addr: ""
              insecure_skip_verify: true
+
      insecure_skip_verify: true
              labels:
+
      labels:
                dc: "<dc>"
+
        dc: "<dc>"
        </syntaxhighlight>
+
</syntaxhighlight>
 
 
 
# Add teleport to <code>/etc/hosts</code>
 
# Add teleport to <code>/etc/hosts</code>
 
+
#*<code>sudo vi /etc/hosts</code>
* <code>sudo vi /etc/hosts</code><br />
 
 
 
 
#* add an entry of <code>10.10.100.22 teleport.<domain></code>
 
#* add an entry of <code>10.10.100.22 teleport.<domain></code>
#**Note: what you made [here](https://www.notion.so/New-RMU-Build-Gen-1-5-28778d147e164cd1b668ebaa759fdcda?pvs=21)
+
#** Note: what you made [[RMU build Gen-1.5: I. Prerequisites#Domain Name|in the domain section of prerequisites]].
#**[[File:Screenshot 2023-12-20 at 11.27.11 AM.png|800x800px]]
+
#**[[File:Screenshot 2023-12-20 at 11.27.11 AM.png|800x800px]]\
 +
#*Save and quit the file
 +
#Start the teleport agent:
 +
#*<code>sudo systemctl enable teleport</code>
 +
#*<code>sudo systemctl start teleport</code>
  
#* Save and quit the file
+
== Continue to next section: [[RMU build Gen-1.5: II. Teleport - D. Teleport Notes|D. Teleport Notes]] ==
# Start the teleport agent:
+
Go to the index of the [[RMU build Gen-1.5|Gen-1.5 RMU build runbook]].
#* <code>sudo systemctl enable teleport</code>
 
#* <code>sudo systemctl start teleport</code>
 

Latest revision as of 21:04, 23 February 2024

This page is part of the Gen-1.5 RMU build runbook.

Go back to the previous section: B. Install Teleport Software

C. Share RMU Services Via Teleport

Ref: https://www.youtube.com/watch?v=cvW4b96aPL0

You can use proxmox to open separate shell windows to make copying/pasting between them easier.

On the teleport server:

  1. Create a short lived token to “invite” the Proxmox application. Be sure to edit the <dc> portion in the following command
    • sudo tctl tokens add --type=app,node --app-name=<dc>-proxmox-webui --app-uri=https://localhost:8006
    • Take note of the token and ca_pin values

On the rmu server:

  1. Install pre-req packages:
    • apt update -y && apt upgrade -y && apt install sudo -y
  2. Install the teleport agent:
  3. create the teleport application config:
    • Ensure that the proxy is pointed to your teleport domain name in the following command
    • Ensure that —-app-name has the correct data center code (dc) code in the following command (IE tp1, bu1, dl1, etc)
    • sudo teleport configure --output=file --proxy=teleport.<domain name>:443 --token=/var/lib/teleport/token --roles=app,node --app-name=<dc>-proxmox-webui --app-uri=https://localhost:8006
  4. Save the token generated on the Teleport server:
    • sudo vi /var/lib/teleport/token
  5. Save the ca_pin generated on the Teleport server:
    • sudo vi /var/lib/teleport/ca_pin
    • Screenshot 2023-12-18 at 4.24.07 PM.png
  6. Edit the /etc/teleport.yaml to update the ca_pin resource:
    • sudo vi /etc/teleport.yaml
    • Update the ca_pin resource with the path to the ca_pin file /var/lib/teleport/ca_pin
    • Under ssh_service: in the same indentation of enabled: “yes” add the following
      • Note: change <dc> to your site’s DC code (IE tp1, sh1, bu1, dl1 etc.)
        jsx
                      labels:
                        dc: "<dc>"      
                        login: "root"
    • Remove commands: section
      yaml
                  commands:
                    - name: hostname
                      command: [hostname]
                      period: 1m0s
    • Under name: <dc>-proxmox-webui , in the same indentation of insecure_skip_verify:, change the value of insecure_skip_verify: to true and add the following:
      • Note: change <dc> to your site’s DC code (IE tp1, sh1, bu1, dl1 etc.)
        jsx
                          labels:
                            dc: "<dc>"
    • Sample /etc/teleport.yaml file:
      version: v3
      teleport:
        nodename: rmu
        data_dir: /var/lib/teleport
        join_params:
          token_name: /var/lib/teleport/token
          method: token
        proxy_server: teleport.<dc>.<domain.name>:443
        log:
          output: stderr
          severity: INFO
          format:
            output: text
        ca_pin: /var/lib/teleport/ca_pin
        diag_addr: ""
      auth_service:
        enabled: "no"
      ssh_service:
        enabled: "yes"
        labels:
          dc: "<dc>"
          login: "root"
      proxy_service:
        enabled: "no"
        https_keypairs: []
        https_keypairs_reload_interval: 0s
        acme: {}
      app_service:
        enabled: "yes"
        debug_app: false
        apps:
        - name: <dc>-proxmox-webui
            uri: https://localhost:8006
            public_addr: ""
            insecure_skip_verify: true
            labels:
              dc: "<dc>"
      
  7. Add teleport to /etc/hosts
  8. Start the teleport agent:
    • sudo systemctl enable teleport
    • sudo systemctl start teleport

Continue to next section: D. Teleport Notes

Go to the index of the Gen-1.5 RMU build runbook.