Pour configurer un bot webhook Wickr IO sur une instance Linux Amazon EC2, procédez comme suit :
-
Ouvrez la console d’administration Wickr. Puis, créez un utilisateur bot. Si vous ne parvenez pas à ouvrir la console d'administration Wickr, faites appel à un administrateur réseau Wickr pour créer l'utilisateur bot.
Remarque : La stratégie de mot de passe par défaut requiert au moins 8 caractères pour un mot de passe. Assurez-vous également que le suffixe du nom de compte contient bot.
-
Lancer une instance Amazon Linux 2023 pour déployer le conteneur :
$ sudo yum update -y
$ sudo dnf install docker
$ sudo systemctl enable docker
$ sudo systemctl start docker
-
Créez le dossier /opt/WickrIO :
$ mkdir /opt
$ cd /opt
$ mkdir WickrIO
-
Déployez le conteneur client Wickr IO. Définissez le mappage de port sur 8080 pour recevoir les requêtes. Cette action entraîne l’entrée automatique dans la ligne de commande du conteneur.
$ sudo docker pull public.ecr.aws/x3s2s6k3/wickrio/bot-cloud:latest
$ sudo docker run -v /opt/WickrIO:/opt/WickrIO -p 8080:8080 -ti public.ecr.aws/x3s2s6k3/wickrio/bot-cloud:latest
-
Acceptez le contrat de licence.
-
À l'invite, saisissez add pour ajouter un nouveau client, puis saisissez le nom d'utilisateur et le mot de passe que vous avez créés.
Exemple :
Remarque : Remplacez example-webhook-bot par votre nom d'utilisateur et example-password par votre mot de passe.
WARNING: Please make sure you include the -t -i (or -ti) option when starting
the WickrIO docker container with the docker run command. This will allow you
to attach and detach from the WickrIO console.
Continue to see welcome message on startup? (default: yes):yes
Enter command:add
Enter the user name:example-webhook-bot
Enter the password:example-password
Creating user:example-webhook-bot"
Begin registration with password.
Begin register new user context.
Successfully created user
Successfully logged in as new user!
Our work is done here, logging off!
The autologin capability allows you to start a bot without having to enter the
password, after the initial login.
NOTE: The bot client's password is NOT saved to disk.
Do you want to use autologin? (default: yes):yes
-
Pour configurer l'intégration wickrio-webhook-bot, procédez comme suit :
Pour faire correspondre le mappage du conteneur, utilisez le port 8080 pour l'intégration.
Utilisez l'adresse IP publique de l'instance Amazon EC2 lorsque vous spécifiez le point de terminaison du récepteur webhook.
Pour vous assurer que vous disposez d'une adresse IP publique statique, associez une adresse IP Elastic à votre instance Amazon EC2.
Exemple :
Remarque : Remplacez example-wickrio-webhook-bot par l'intégration de votre bot.
Enter the bot integration to use:example-wickrio-webhook-bot
**********************************************************************
Begin setup of wickrio-webhook-bot software for example-webhook-bot
v16.20.2
6.20.1
npm notice
npm notice New major version of npm available! 8.19.4 -> 10.5.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.0
npm notice Run npm install -g npm@10.5.0 to update!
npm notice
Copying wickrio-webhook-bot from the NPM registry
Searching NPM registry
Searching NPM registry
Searching NPM registry
Searching NPM registry
Searching NPM registry
Installing example-wickrio-webhook-bot software
Begin configuration of example-wickrio-webhook-bot software for example-webhook-bot
Select a port for the bot HTTP server [8080]:8080
Enter the frontend URL for your webhook receiver :exampl-webhook-bot-ip
Integration files written to:
/opt/WickrIO/clients/client-webhook-bot/integration/example-wickrio-webhook-bot
End of setup of example-wickrio-webhook-bot software for example-webhook-bot
**********************************************************************
Successfully added record to the database!
-
Pour confirmer la commande du client et démarrer le client, procédez comme suit :
Pour afficher les clients disponibles, saisissez la commande list à l'invite.
Localisez le client que vous souhaitez démarrer. Notez le numéro d'index #.
Pour démarrer le client, saisissez list à l'invite. Par exemple, si le numéro d'index est 0, saisissez start 0.
Après avoir saisi la commande start, saisissez à nouveau list pour vérifier que l'état du client est En cours d'exécution.
Exemple :
Enter command:list
Current list of clients:
# Name Status Integration Version Misc
=======================================================================
0 example-webhook-bot Paused wickrio-webhook-bot unknown
Enter command:start 0
Preparing to start the client with the name example-webhook-bot
Do you really want to start the client with the name client-webhook-bot:yes
Enter password for this client:********
Enter command:list
Current list of clients:
# Name Status Integration Version Events Misc
================================================================================
0 example-webhook-bot Running wickrio-webhook-bot unknown 1
-
Pour tester le port de service, rendez-vous sur http://example-ip-address:8080. Les éléments suivants sont présentés :
Cannot GET /
Remarque : Si l'étape précédente échoue, vérifiez le groupe de sécurité et les paramètres réseau de votre instance Amazon EC2.
-
Créez un utilisateur Wickr normal et connectez-vous au client Wickr.
-
Créez une salle, puis ajoutez l'utilisateur bot example-webhook-bot en tant que modérateur. Cette valeur est nécessaire pour autoriser la messagerie.
-
Pour afficher l'URL de requête de la salle la fenêtre de discussion, saisissez /show :