Exemplo n.º 1
0
    def install_hdfs_xml(self):
        target = OsUtil.join(self.target, 'shared', 'resources', 'spark')

        OsUtil.mkdir('-p {}'.format(target))
        OsUtil.install(source=OsUtil.join(self.source, 'spark'),
                       target=target,
                       files=['hdfs-site.xml'],
                       file_suffix='.example')
Exemplo n.º 2
0
    def install_dockerfile(self):
        target = OsUtil.join(self.target, 'shared', 'resources', 'jupyter')

        OsUtil.mkdir('-p {}'.format(target))
        OsUtil.install(source=OsUtil.join(self.source, 'jupyter'),
                       target=target,
                       files=['Dockerfile'],
                       file_suffix='.example')
Exemplo n.º 3
0
 def __init__(self, args):
     InitScript.__init__(self,
                         args=args,
                         source=OsUtil.join(Paths.app_root(), 'shared', 'resources', 'spark'),
                         target=Paths.spark_conf_path(),
                         start_message='i| running DockerScript')
Exemplo n.º 4
0
 def root():
     return OsUtil.join(os.path.dirname(__file__))
Exemplo n.º 5
0
 def resources_path():
     return OsUtil.join(Paths.root(), 'shared', 'resources')
Exemplo n.º 6
0
 def spark_conf_path():
     return OsUtil.join(Paths.spark_path(), 'conf')
Exemplo n.º 7
0
 def install_docker_compose(self):
     OsUtil.install(source=OsUtil.join(self.source, 'jupyter'),
                    target=self.target,
                    files=['docker-compose.yml'],
                    file_suffix='.example')
Exemplo n.º 8
0
    def install_requirements_file(self):
        print('i| installing requirements')

        with open(OsUtil.join(self.target, 'requirements.txt'), 'a') as _file:
            _file.write("\neasy_etl==0.1.0\n")