添加slave服务器
        :return:

def add_slave_server(self):
        """
        添加slave服务器
        :return:
        """
        master = self.args.config[1]
        slave = self.args.add_slave

        # install java at slave server
        self.reset_server_env(slave, self.configure)
        if self.prompt_check("Update package at slave server"):
            self.update_source_list()
            self.common_update_sys()

        if self.prompt_check("Install java and python at slave server"):
            self.java_install()
            sudo('apt-get install -y python python3 python-dev python3-dev')

        # generate ssh key at master server
        if not self.args.skip_master:
            if self.prompt_check("Generate ssh key at Master Server"):
                self.generate_ssh(master, self.args, self.configure)

        # generate ssh key at slave server and make slave connect with master
        if self.prompt_check("Make ssh connection within master and slave"):
            self.generate_ssh(slave, self.args, self.configure)

            # scp slave server ssh key to master server
            run('scp ~/.ssh/id_rsa.pub {0}@{1}:~/.ssh/id_rsa.pub.{2}'.format(
                self.configure[master]['user'],
                self.configure[master]['host'],
                slave
            ))

            # add slave ssh key to master authorized_keys
            self.reset_server_env(master, self.configure)
            run('cat ~/.ssh/id_rsa.pub* >> ~/.ssh/authorized_keys')

            # scp master authorized_keys to slave authorized_keys
            run('scp ~/.ssh/authorized_keys {0}@{1}:~/.ssh'.format(
                self.configure[slave]['user'],
                self.configure[slave]['host']
            ))

        # config slave and master
        if self.prompt_check("Configure master and slave server"):
            master = self.args.config[1]
            slave = self.args.add_slave

            if self.args.bigdata_app == 'spark':
                self.add_spark_slave(master, slave, self.configure)