Пример #1
0
def mysql_configure():
    from params import params

    if params.install_mysql == 'Yes':
        mysql_service(daemon_name=params.daemon_name, action='start')

    replace_bind_address = ('sed', '-i', 's|^bind-address[ \t]*=.*|bind-address = 0.0.0.0|', params.mysql_configname)
    Execute(replace_bind_address,
            sudo=True,
            )

    mysql_users.mysql_adduser()

    File(params.mysql_create_geoip_path,
         mode=0755,
         content=StaticFile('createMysqlGeoIp.sh')
         )

    geoip_setup_cmd = format("bash -x {mysql_create_geoip_path} {geoip_ddl} {geoip_url} {mysql_admin_password!p}")

    Execute(geoip_setup_cmd,
            tries=3,
            try_sleep=5,
            path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
            )

    if params.install_mysql == 'Yes':
        mysql_service(daemon_name=params.daemon_name, action='stop')
Пример #2
0
def mysql_configure():
    from params import params

    if params.install_mysql == 'Yes':
        mysql_service(daemon_name=params.daemon_name, action='start')

    replace_bind_address = ('sed', '-i',
                            's|^bind-address[ \t]*=.*|bind-address = 0.0.0.0|',
                            params.mysql_configname)
    Execute(
        replace_bind_address,
        sudo=True,
    )

    mysql_users.mysql_adduser()

    File(params.mysql_create_geoip_path,
         mode=0755,
         content=StaticFile('createMysqlGeoIp.sh'))

    geoip_setup_cmd = format(
        "bash -x {mysql_create_geoip_path} {geoip_ddl} {geoip_url} {mysql_admin_password!p}"
    )

    Execute(
        geoip_setup_cmd,
        tries=3,
        try_sleep=5,
        path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
    )

    if params.install_mysql == 'Yes':
        mysql_service(daemon_name=params.daemon_name, action='stop')
Пример #3
0
  def start(self, env):
    import params
    env.set_params(params)
    mysql_service(daemon_name=params.daemon_name, action = 'start')
    print "ok"

    Links(params.new_goldeneye_data_path_metadb, params.goldeneye_data_path_metadb)
Пример #4
0
  def start(self, env):
    import params
    env.set_params(params)

    self.configure(env)

    mysql_service(daemon_name=params.ftp_service_daemon, action = 'start')
Пример #5
0
    def configure(self, env):
        import params
        env.set_params(params)

        mysql_service(daemon_name=params.daemon_name, action='start')

        File(params.mysql_adduser_path,
             mode=0755,
             content=StaticFile('addMysqlUser.sh'))

        cmd = format(
            "bash -x {mysql_adduser_path} {daemon_name} {hive_metastore_user_name} {hive_metastore_user_passwd!p} {mysql_host[0]}"
        )

        Execute(cmd,
                tries=3,
                try_sleep=5,
                path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin')
Пример #6
0
  def configure(self, env):
    import params
    env.set_params(params)

    mysql_service(daemon_name=params.daemon_name, action='start')

    File(params.mysql_adduser_path,
         mode=0755,
         content=StaticFile('addMysqlUser.sh')
    )

    cmd = format("bash -x {mysql_adduser_path} {daemon_name} {hive_metastore_user_name} {hive_metastore_user_passwd!p} {mysql_host[0]}")

    Execute(cmd,
            tries=3,
            try_sleep=5,
            path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'
    )
Пример #7
0
    def configure(self, env):
        import params
        env.set_params(params)

        mysql_service(daemon_name=self.daemon_name, action='start')

        File(params.mysql_adduser_path,
             mode=0755,
             content=StaticFile('addMysqlUser.sh'))

        # Autoescaping
        cmd = ("bash", "-x", params.mysql_adduser_path, self.daemon_name,
               params.hive_metastore_user_name,
               params.hive_metastore_user_passwd, params.mysql_host[0])

        Execute(cmd,
                tries=3,
                try_sleep=5,
                path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
                logoutput=True)

        mysql_service(daemon_name=self.daemon_name, action='stop')
Пример #8
0
  def configure(self, env):
    import params
    env.set_params(params)

    mysql_service(daemon_name=self.daemon_name, action='start')

    File(params.mysql_adduser_path,
         mode=0755,
         content=StaticFile('addMysqlUser.sh')
    )

    # Autoescaping
    cmd = ("bash", "-x", params.mysql_adduser_path, self.daemon_name,
           params.hive_metastore_user_name, params.hive_metastore_user_passwd, params.mysql_host[0])

    Execute(cmd,
            tries=3,
            try_sleep=5,
            path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
            logoutput=True
    )

    mysql_service(daemon_name=self.daemon_name, action='stop')
Пример #9
0
 def stop(self, env, rolling_restart=False):
   import params
   env.set_params(params)
   mysql_service(action='stop')
Пример #10
0
  def status(self, env):
    import params

    mysql_service(daemon_name=params.ftp_service_daemon, action = 'status')
Пример #11
0
  def stop(self, env):
    import params
    env.set_params(params)

    mysql_service(daemon_name=params.daemon_name, action = 'stop')
Пример #12
0
 def status(self, env):
   import status_params
   mysql_service(daemon_name=status_params.daemon_name, action = 'status')
Пример #13
0
    def status(self, env):
        import status_params
        env.set_params(status_params)

        mysql_service(action='status')
Пример #14
0
 def stop(self, env, upgrade_type=None):
     import params
     env.set_params(params)
     mysql_service(daemon_name=params.daemon_name, action='stop')
Пример #15
0
    def status(self, env):
        from params import status_params
        env.set_params(status_params)

        mysql_service(daemon_name=status_params.daemon_name, action='status')
Пример #16
0
 def stop(self, env):
     import params
     env.set_params(params)
     mysql_service(action='stop')
Пример #17
0
 def stop(self, env, rolling_restart=False):
     from params import params
     env.set_params(params)
     mysql_service(daemon_name=params.daemon_name, action='stop')
Пример #18
0
 def status(self, env):
   mysql_service(daemon_name=self.daemon_name, action = 'status')
Пример #19
0
    def stop(self, env):
        import params
        env.set_params(params)

        mysql_service(daemon_name=self.daemon_name, action='stop')
Пример #20
0
    def start(self, env):
        import params
        env.set_params(params)

        mysql_service(daemon_name=params.daemon_name, action='start')
Пример #21
0
 def status(self, env):
     import status_params
     mysql_service(daemon_name=status_params.daemon_name, action='status')
Пример #22
0
 def status(self, env):
     mysql_service(daemon_name=self.daemon_name, action='status')
Пример #23
0
 def start(self, env):
   import params
   env.set_params(params)
   mysql_service(daemon_name=params.daemon_name, action = 'start')
   print "ok"