Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Wishlist
  3. HashiCorp Vault

HashiCorp Vault

Scheduled Pinned Locked Moved Solved App Wishlist
32 Posts 5 Posters 4.4k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ultravioletU ultraviolet

    Actually, I went and RTFM: https://cloudron.io/documentation/storage/ I might be able to add custom properties but that would mean all the containers would have the priv.

    @girish can you shed any light on the --cap-add=IPC_LOCK being passed to docker?

    thanks

    mehdiM Offline
    mehdiM Offline
    mehdi
    App Dev
    wrote on last edited by
    #4

    @ultraviolet take a look at https://cloudron.io/documentation/custom-apps/manifest/#capabilities

    This mechanism is already used for some apps (at least OpenVPN, which also needs a capability for networking stuff). The MLOCK capability is currenlty not one of the possibilties, but it would be trivial to add to a future version of cloudron

    ultravioletU 1 Reply Last reply
    1
    • mehdiM mehdi

      @ultraviolet take a look at https://cloudron.io/documentation/custom-apps/manifest/#capabilities

      This mechanism is already used for some apps (at least OpenVPN, which also needs a capability for networking stuff). The MLOCK capability is currenlty not one of the possibilties, but it would be trivial to add to a future version of cloudron

      ultravioletU Offline
      ultravioletU Offline
      ultraviolet
      App Dev
      wrote on last edited by
      #5

      @mehdi awesome thanks.

      1 Reply Last reply
      1
      • ultravioletU Offline
        ultravioletU Offline
        ultraviolet
        App Dev
        wrote on last edited by
        #6

        If anyone is interested the repo is here https://github.com/euanmcgregor/vault-cloudron

        It is working, I am just looking at LDAP integration just now.

        marioM 1 Reply Last reply
        3
        • ultravioletU ultraviolet

          If anyone is interested the repo is here https://github.com/euanmcgregor/vault-cloudron

          It is working, I am just looking at LDAP integration just now.

          marioM Offline
          marioM Offline
          mario
          App Dev
          wrote on last edited by
          #7

          @ultraviolet you're a star, thank you so much.

          Thanks for the additional clarifications on the manifest capabilities @mehdi

          If @girish and @nebulon can add the capability for MLOCK and you can get the LDAP working, that would be beyond awesome.

          1 Reply Last reply
          1
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #8

            @ultraviolet Thanks! I have added mlock capability for 5.4 in https://git.cloudron.io/cloudron/box/-/commit/84f41e08cfbd3eb4dd5ac2d0e949b6a6d724f1c7

            For now (until 5.4) is out, I guess you can disable mlock using disable_mlock ? (Atleast as per https://github.com/hashicorp/docker-vault/issues/24)

            ultravioletU 1 Reply Last reply
            1
            • girishG girish

              @ultraviolet Thanks! I have added mlock capability for 5.4 in https://git.cloudron.io/cloudron/box/-/commit/84f41e08cfbd3eb4dd5ac2d0e949b6a6d724f1c7

              For now (until 5.4) is out, I guess you can disable mlock using disable_mlock ? (Atleast as per https://github.com/hashicorp/docker-vault/issues/24)

              ultravioletU Offline
              ultravioletU Offline
              ultraviolet
              App Dev
              wrote on last edited by
              #9

              @girish that is awesome stuff. I have disabled mlock in the config to get to get it going, once 5.4 is out I will adjust the manifest file.

              Just working on LDAP integration!

              1 Reply Last reply
              1
              • girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #10

                @ultraviolet It seems we need to make another 5.3 release because of some issues. So, maybe I can put this in 5.3 as well. Let me see.

                ultravioletU 1 Reply Last reply
                1
                • girishG girish

                  @ultraviolet It seems we need to make another 5.3 release because of some issues. So, maybe I can put this in 5.3 as well. Let me see.

                  ultravioletU Offline
                  ultravioletU Offline
                  ultraviolet
                  App Dev
                  wrote on last edited by
                  #11

                  @girish awesome. I can see that the change is in 5.3 and I have just upgraded. Made a small change but it is still throwing the error, my manifest file shows this now:

                  
                  {
                    "id": "com.vault.cloudron",
                    "version": "0.1.0",
                    "minBoxVersion": "5.3.0",
                    "healthCheckPath": "/",
                    "httpPort": 8200,
                    "addons": {
                      "localstorage": {},
                      "ldap": {}
                    },
                    "capabilities": [
                      "mlock"
                    ],
                    "manifestVersion": 2
                  }
                  

                  Not sure if I am missing something here?

                  1 Reply Last reply
                  0
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #12

                    @ultraviolet Let me test it out and get back. How should I test this? Just build the app and install it and it will fail ?

                    1 Reply Last reply
                    0
                    • ultravioletU Offline
                      ultravioletU Offline
                      ultraviolet
                      App Dev
                      wrote on last edited by
                      #13

                      pretty much yeah, the services won't start and the logs will show an error message

                      fbartelsF 1 Reply Last reply
                      0
                      • ultravioletU ultraviolet

                        pretty much yeah, the services won't start and the logs will show an error message

                        fbartelsF Offline
                        fbartelsF Offline
                        fbartels
                        App Dev
                        wrote on last edited by fbartels
                        #14

                        @ultraviolet I think I got a littler closer to a working state. Currently restarting since my Cloudron wanted a reboot after the last update.

                        https://github.com/euanmcgregor/vault-cloudron/pull/1

                        edit: hmm, no. this is what is logged:

                        Jun 29 20:54:05 2020-06-29 18:54:05,044 INFO spawned: 'vault' with pid 12
                        Jun 29 20:54:05 Error initializing core: Failed to lock memory: cannot allocate memory
                        Jun 29 20:54:05
                        Jun 29 20:54:05 This usually means that the mlock syscall is not available.
                        Jun 29 20:54:05 Vault uses mlock to prevent memory from being swapped to
                        Jun 29 20:54:05 disk. This requires root privileges as well as a machine
                        Jun 29 20:54:05 that supports mlock. Please enable mlock on your system or
                        Jun 29 20:54:05 disable Vault from using it. To disable Vault from using it,
                        Jun 29 20:54:05 set the `disable_mlock` configuration option in your configuration
                        Jun 29 20:54:05 file.
                        Jun 29 20:54:05 2020-06-29 18:54:05,115 INFO exited: vault (exit status 1; not expected)
                        Jun 29 20:54:06 2020-06-29 18:54:06,118 INFO spawned: 'vault' with pid 23
                        
                        ultravioletU 1 Reply Last reply
                        0
                        • fbartelsF fbartels

                          @ultraviolet I think I got a littler closer to a working state. Currently restarting since my Cloudron wanted a reboot after the last update.

                          https://github.com/euanmcgregor/vault-cloudron/pull/1

                          edit: hmm, no. this is what is logged:

                          Jun 29 20:54:05 2020-06-29 18:54:05,044 INFO spawned: 'vault' with pid 12
                          Jun 29 20:54:05 Error initializing core: Failed to lock memory: cannot allocate memory
                          Jun 29 20:54:05
                          Jun 29 20:54:05 This usually means that the mlock syscall is not available.
                          Jun 29 20:54:05 Vault uses mlock to prevent memory from being swapped to
                          Jun 29 20:54:05 disk. This requires root privileges as well as a machine
                          Jun 29 20:54:05 that supports mlock. Please enable mlock on your system or
                          Jun 29 20:54:05 disable Vault from using it. To disable Vault from using it,
                          Jun 29 20:54:05 set the `disable_mlock` configuration option in your configuration
                          Jun 29 20:54:05 file.
                          Jun 29 20:54:05 2020-06-29 18:54:05,115 INFO exited: vault (exit status 1; not expected)
                          Jun 29 20:54:06 2020-06-29 18:54:06,118 INFO spawned: 'vault' with pid 23
                          
                          ultravioletU Offline
                          ultravioletU Offline
                          ultraviolet
                          App Dev
                          wrote on last edited by
                          #15

                          @fbartels if you change the variable disable_mlock in the start.sh to true it should start but the new capability will negate this.

                          fbartelsF 1 Reply Last reply
                          0
                          • ultravioletU ultraviolet

                            @fbartels if you change the variable disable_mlock in the start.sh to true it should start but the new capability will negate this.

                            fbartelsF Offline
                            fbartelsF Offline
                            fbartels
                            App Dev
                            wrote on last edited by
                            #16

                            @ultraviolet yes, that is the workaround I am using at the moment as well.

                            ultravioletU 1 Reply Last reply
                            0
                            • fbartelsF fbartels

                              @ultraviolet yes, that is the workaround I am using at the moment as well.

                              ultravioletU Offline
                              ultravioletU Offline
                              ultraviolet
                              App Dev
                              wrote on last edited by
                              #17

                              @fbartels cool will wait and see what @girish finds.

                              fbartelsF 1 Reply Last reply
                              0
                              • ultravioletU ultraviolet

                                @fbartels cool will wait and see what @girish finds.

                                fbartelsF Offline
                                fbartelsF Offline
                                fbartels
                                App Dev
                                wrote on last edited by
                                #18

                                @ultraviolet do you have ldap working already?

                                You had the ldap script missing (not added with git add) so I tried my own, but even after config has completed I cannot login and only get Authentication failed: ldap operation failed: unable to retrieve user bind DN

                                ultravioletU 1 Reply Last reply
                                0
                                • fbartelsF fbartels

                                  @ultraviolet do you have ldap working already?

                                  You had the ldap script missing (not added with git add) so I tried my own, but even after config has completed I cannot login and only get Authentication failed: ldap operation failed: unable to retrieve user bind DN

                                  ultravioletU Offline
                                  ultravioletU Offline
                                  ultraviolet
                                  App Dev
                                  wrote on last edited by ultraviolet
                                  #19

                                  @fbartels I did try to get ldap going, the issue doing it automatically during install is you need to unseal and login to the vault before you can enable the LDAP. Which is hard when the login info is in a text file I am sure it is possible but my knowledge is a bit limited on that, plus it might not be idempotent.

                                  When I tried it manually it gave me that exact error I am still checking to see what the issue might be but I have kind of drawn a blank at the moment. Will take a fresh look later this week when I get a bit of time.

                                  fbartelsF 1 Reply Last reply
                                  1
                                  • girishG Offline
                                    girishG Offline
                                    girish
                                    Staff
                                    wrote on last edited by
                                    #20

                                    I can reproduce it. The container definitely has the IPC_LOCK caps, maybe it needs something more. Investigating

                                    1 Reply Last reply
                                    0
                                    • girishG Offline
                                      girishG Offline
                                      girish
                                      Staff
                                      wrote on last edited by
                                      #21

                                      @ultraviolet https://github.com/euanmcgregor/vault-cloudron/pull/2 fixes the mlock issue

                                      fbartelsF 1 Reply Last reply
                                      1
                                      • girishG girish

                                        @ultraviolet https://github.com/euanmcgregor/vault-cloudron/pull/2 fixes the mlock issue

                                        fbartelsF Offline
                                        fbartelsF Offline
                                        fbartels
                                        App Dev
                                        wrote on last edited by
                                        #22

                                        @girish ah, yes of course. You need to set the capability on the binary to make use of it (as non root).

                                        1 Reply Last reply
                                        0
                                        • girishG Offline
                                          girishG Offline
                                          girish
                                          Staff
                                          wrote on last edited by
                                          #23

                                          We can probably remove the supervisor use entirely and just use gosu exec cloudron:cloudron but maybe it's there for a reason

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search