Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Add option to mount ephemeral disks for image storage #95

Merged

Conversation

pieterlange
Copy link
Contributor

Intended to be used on instances that come with local storage (eg the m3, c3,r3 andg2 instance types).

When just setting the enabled flag it formats (XFS) & mounts the local xvdb disk by default to the appropriate location (depending on container runtime). I chose XFS because of speed and the generous amounts of inodes by default.
Users can choose the filesystem and source disk by overriding the defaults:

experimental:
  ephemeralImageStorage:
    enabled: true
    disk: xvdc
    filesystem: ext4

⚠️ i haven't tested rkt as container runtime yet but i guess this will work? ⚔️

I would like to add the option to RAID together some local disks. The defaults should work all nodes with local storage, but doesn't use additional disks which is a waste if you move up to nodes of reasonable size (xlarge). Might add format/mount options later too.

Submitting incomplete work because @mumoshu seems to like rolling balls 😆 ⚽

@codecov-io
Copy link

codecov-io commented Nov 24, 2016

Current coverage is 55.53% (diff: 100%)

Merging #95 into master will increase coverage by 0.21%

@@             master        #95   diff @@
==========================================
  Files             4          4          
  Lines          1052       1057     +5   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            582        587     +5   
  Misses          388        388          
  Partials         82         82          

Powered by Codecov. Last update d7b0d4b...3745e9d

@pieterlange pieterlange changed the title Add option to mount mount ephemeral disks for image storage Add option to mount ephemeral disks for image storage Nov 24, 2016
@pieterlange pieterlange force-pushed the feature/ephemeral-image-storage branch from b1835af to 60f9123 Compare November 24, 2016 20:29
@@ -189,6 +189,8 @@ kmsKeyArn: "{{.KMSKeyARN}}"
# CFNSTACK: '{ "Ref" : "AWS::StackId" }'
# waitSignal:
# enabled: true
# ephemeralImageStorage:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind documenting it like not tested with rkt (yet) so we can be more explicit about what will/will not work 👍

@mumoshu
Copy link
Contributor

mumoshu commented Nov 25, 2016

I like this idea and yes, I like rolling balls! 🍙 💨
I've left a minor comment. Other than that, I'm ok to merge this.

@pieterlange pieterlange force-pushed the feature/ephemeral-image-storage branch from 60f9123 to 3745e9d Compare November 25, 2016 06:46
@pieterlange
Copy link
Contributor Author

Done 👍

@mumoshu
Copy link
Contributor

mumoshu commented Nov 25, 2016

LGTM 👍 Thanks for your continuous efforts 🙏

@mumoshu mumoshu merged commit faadb70 into kubernetes-retired:master Nov 25, 2016
@mumoshu mumoshu added this to the v0.9.2-rc.1 milestone Nov 25, 2016
@tarvip
Copy link
Contributor

tarvip commented Dec 2, 2016

Although this PR is already merged, but what about adding var-lib-docker.mount as dependency for docker.service, to make sure that it gets mounted before docker starts? Something like:

    - name: docker.service
      drop-ins:
{{if .Experimental.EphemeralImageStorage.Enabled}}
        - name: 10-docker-mount.conf
          content: |
            [Unit]
            After=var-lib-docker.mount
            Wants=var-lib-docker.mount
{{end}}

Using Wants allows using this drop-in even for instance types that do not have ephemeral storage available.

@pieterlange
Copy link
Contributor Author

Sounds like a plan 👍 Will you make the PR? 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants