def _prepare_pebble_server(self): """Configure and launch the Pebble server""" print('=> Starting pebble instance deployment...') pebble_path, challtestsrv_path, pebble_config_path = pebble_artifacts.fetch( self._workspace) # Configure Pebble at full speed (PEBBLE_VA_NOSLEEP=1) and not randomly refusing valid # nonce (PEBBLE_WFE_NONCEREJECT=0) to have a stable test environment. environ = os.environ.copy() environ['PEBBLE_VA_NOSLEEP'] = '1' environ['PEBBLE_WFE_NONCEREJECT'] = '0' self._launch_process([ pebble_path, '-config', pebble_config_path, '-dnsserver', '127.0.0.1:8053' ], env=environ) self._launch_process([ challtestsrv_path, '-management', ':{0}'.format(CHALLTESTSRV_PORT), '-defaultIPv6', '""', '-defaultIPv4', '127.0.0.1', '-http01', '""', '-tlsalpn01', '""', '-https01', '""' ]) # Wait for the ACME CA server to be up. print('=> Waiting for pebble instance to respond...') misc.check_until_timeout(self.acme_xdist['directory_url']) print('=> Finished pebble instance deployment.')
def _prepare_pebble_server(self): """Configure and launch the Pebble server""" print('=> Starting pebble instance deployment...') pebble_path, challtestsrv_path, pebble_config_path = pebble_artifacts.fetch(self._workspace) # Configure Pebble at full speed (PEBBLE_VA_NOSLEEP=1) and not randomly refusing valid # nonce (PEBBLE_WFE_NONCEREJECT=0) to have a stable test environment. environ = os.environ.copy() environ['PEBBLE_VA_NOSLEEP'] = '1' environ['PEBBLE_WFE_NONCEREJECT'] = '0' self._launch_process( [pebble_path, '-config', pebble_config_path, '-dnsserver', '127.0.0.1:8053'], env=environ) self._launch_process( [challtestsrv_path, '-management', ':{0}'.format(CHALLTESTSRV_PORT), '-defaultIPv6', '""', '-defaultIPv4', '127.0.0.1', '-http01', '""', '-tlsalpn01', '""', '-https01', '""']) # pebble_ocsp_server is imported here and not at the top of module in order to avoid a useless # ImportError, in the case where cryptography dependency is too old to support ocsp, but # Boulder is used instead of Pebble, so pebble_ocsp_server is not used. This is the typical # situation of integration-certbot-oldest tox testenv. from certbot_integration_tests.utils import pebble_ocsp_server self._launch_process([sys.executable, pebble_ocsp_server.__file__]) # Wait for the ACME CA server to be up. print('=> Waiting for pebble instance to respond...') misc.check_until_timeout(self.acme_xdist['directory_url']) print('=> Finished pebble instance deployment.')