Apache Mesos
overlay.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __MESOS_PROVISIONER_OVERLAY_HPP__
18 #define __MESOS_PROVISIONER_OVERLAY_HPP__
19 
21 
22 namespace mesos {
23 namespace internal {
24 namespace slave {
25 
26 // Forward declaration.
27 class OverlayBackendProcess;
28 
29 
30 // This backend mounts the images layers to the rootfs using the overlay file
31 // system. The directory layout is as follows:
32 // <work_dir> ('--work_dir' flag)
33 // |-- provisioner
34 // |-- containers
35 // |-- <container-id>
36 // |-- backends
37 // |-- overlay
38 // |-- rootfses
39 // |-- <rootfs_id> (the rootfs)
40 // |-- scratch
41 // |-- <rootfs_id> (the scratch space)
42 // |-- upperdir
43 // |-- workdir
44 // |-- links (symlink to temp dir with links to layers) // NOLINT(whitespace/line_length)
45 class OverlayBackend : public Backend
46 {
47 public:
48  ~OverlayBackend() override;
49 
51 
53  const std::vector<std::string>& layers,
54  const std::string& rootfs,
55  const std::string& backendDir) override;
56 
58  const std::string& rootfs,
59  const std::string& backendDir) override;
60 
61 private:
63 
65  OverlayBackend& operator=(const OverlayBackend&);
66 
68 };
69 
70 } // namespace slave {
71 } // namespace internal {
72 } // namespace mesos {
73 
74 #endif // __MESOS_PROVISIONER_OVERLAY_HPP__
static Try< process::Owned< Backend > > create(const Flags &)
Definition: check.hpp:33
process::Future< bool > destroy(const std::string &rootfs, const std::string &backendDir) override
Definition: flags.hpp:39
Definition: backend.hpp:36
process::Future< Nothing > provision(const std::vector< std::string > &layers, const std::string &rootfs, const std::string &backendDir) override
Definition: spec.hpp:26
Definition: attributes.hpp:24
Definition: executor.hpp:48
Definition: overlay.hpp:45